Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: chrome/browser/ui/ash/chrome_keyboard_ui.cc

Issue 2122873002: Add virtualKeyboardPrivate.onKeyboardClosed API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test error. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/ui/login_display_host_impl.cc ('k') | components/arc/ime/arc_ime_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_keyboard_ui.cc
diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.cc b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
index 96b5e66f0b01d2533e2269f60d62944c9b68512d..9bc61f035274910183a0e03e5a5b1ea94ccee719 100644
--- a/chrome/browser/ui/ash/chrome_keyboard_ui.cc
+++ b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
@@ -105,6 +105,22 @@ class AshKeyboardControllerObserver
router->BroadcastEvent(std::move(event));
}
+ void OnKeyboardClosed() override {
+ extensions::EventRouter* router = extensions::EventRouter::Get(context_);
+
+ if (!router->HasEventListener(
+ virtual_keyboard_private::OnKeyboardClosed::kEventName)) {
+ return;
+ }
+
+ std::unique_ptr<extensions::Event> event(new extensions::Event(
+ extensions::events::VIRTUAL_KEYBOARD_PRIVATE_ON_KEYBOARD_CLOSED,
+ virtual_keyboard_private::OnKeyboardClosed::kEventName,
+ base::WrapUnique(new base::ListValue())));
+ event->restrict_to_browser_context = context_;
+ router->BroadcastEvent(std::move(event));
+ }
+
private:
content::BrowserContext* context_;
« no previous file with comments | « chrome/browser/chromeos/login/ui/login_display_host_impl.cc ('k') | components/arc/ime/arc_ime_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698