[emoji] Remove emoji option from Mojo apps.

Currently right-clicking on input fields in Mojo apps will bring up
an emoji option. Clicking it would crash the app. This is because we
assume that an emoji callback function always exists, but actually this
is not true for Mojo apps because they are in a different process.

This patch adds a null check for the emoji callback so that we don't
show the emoji option when we don't have a callback.

Bug: 887649
Change-Id: Iaccb0d9f890187f5c405888babefde7d3f33abe0
Reviewed-on: https://chromium-review.googlesource.com/c/1393584
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619868}
2 files changed