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

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: Change OnKeyboardClosed as pure virtual method. 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..f5caacd852fe204b1849a7ed9475579e857c5a81 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_;

Powered by Google App Engine
This is Rietveld 408576698