Chromium Code Reviews| 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_; |