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

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: Created 4 years, 5 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
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 1128f6ae93c9cc5ca2ebbdbd89e3a4e859ce571d..062a6c20f8d66c9ccccd1c68acf9aa63b7f09c03 100644
--- a/chrome/browser/ui/ash/chrome_keyboard_ui.cc
+++ b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
@@ -105,6 +105,23 @@ class AshKeyboardControllerObserver
router->BroadcastEvent(std::move(event));
}
+ void OnKeyboardDestroyed() override {
+ extensions::EventRouter* router = extensions::EventRouter::Get(context_);
+
+ if (!router->HasEventListener(
+ virtual_keyboard_private::OnKeyboardDestroyed::kEventName)) {
+ return;
+ }
+
+ std::unique_ptr<base::ListValue> args(new base::ListValue());
+ std::unique_ptr<extensions::Event> event(new extensions::Event(
+ extensions::events::VIRTUAL_KEYBOARD_PRIVATE_ON_KEYBOARD_DESTROYED,
+ virtual_keyboard_private::OnKeyboardDestroyed::kEventName,
+ std::move(args)));
sky 2016/07/06 16:03:00 nit: std::move(args)->base::WrapUnique(new base::L
Azure Wei 2016/07/08 06:35:24 Done.
+ event->restrict_to_browser_context = context_;
+ router->BroadcastEvent(std::move(event));
+ }
+
private:
content::BrowserContext* context_;
« no previous file with comments | « no previous file | extensions/browser/extension_event_histogram_value.h » ('j') | ui/keyboard/keyboard_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698