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

Side by Side Diff: chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.cc

Issue 1870783003: Notifies the IME extension for IME ready with onActivate/onFocus events at start. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" 5 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 InputComponents::GetInputComponents(extension); 623 InputComponents::GetInputComponents(extension);
624 if (!input_components || input_components->empty()) 624 if (!input_components || input_components->empty())
625 return; 625 return;
626 InputImeEventRouter* event_router = 626 InputImeEventRouter* event_router =
627 GetInputImeEventRouter(Profile::FromBrowserContext(browser_context)); 627 GetInputImeEventRouter(Profile::FromBrowserContext(browser_context));
628 if (event_router) { 628 if (event_router) {
629 event_router->UnregisterAllImes(extension->id()); 629 event_router->UnregisterAllImes(extension->id());
630 } 630 }
631 } 631 }
632 632
633 void InputImeAPI::OnListenerAdded(const EventListenerInfo& details) {
634 if (!details.browser_context)
635 return;
636 InputMethodEngine* engine =
637 GetActiveEngine(Profile::FromBrowserContext(details.browser_context),
638 details.extension_id);
639 // Notifies the IME extension for IME ready with onActivate/onFocus events.
640 if (engine)
641 engine->Enable(engine->GetActiveComponentId());
642 }
643
644 } // namespace extensions 633 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698