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

Side by Side Diff: ui/base/ime/chromeos/ime_bridge.cc

Issue 190033005: [IME] Removes the duplicated IMEs in chrome://settings/languages, and support async component IMEs … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: try to make test green. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/ime/component_extension_ime_manager_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/base/ime/chromeos/ime_bridge.h" 5 #include "ui/base/ime/chromeos/ime_bridge.h"
6 6
7 #include <map> 7 #include <map>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual void SetCurrentEngineHandler( 59 virtual void SetCurrentEngineHandler(
60 IMEEngineHandlerInterface* handler) OVERRIDE { 60 IMEEngineHandlerInterface* handler) OVERRIDE {
61 engine_handler_ = handler; 61 engine_handler_ = handler;
62 } 62 }
63 63
64 // IMEBridge override. 64 // IMEBridge override.
65 virtual IMEEngineHandlerInterface* SetCurrentEngineHandlerById( 65 virtual IMEEngineHandlerInterface* SetCurrentEngineHandlerById(
66 const std::string& engine_id) OVERRIDE { 66 const std::string& engine_id) OVERRIDE {
67 std::map<std::string, IMEEngineHandlerInterface*>::const_iterator itor = 67 std::map<std::string, IMEEngineHandlerInterface*>::const_iterator itor =
68 engine_handler_map_.find(engine_id); 68 engine_handler_map_.find(engine_id);
69 // |engine_id| must be found unless it's empty, but if it's not found, fall 69 // It is normal in that the engine is not found, because sometimes the
70 // back to NULL when non-debug build. 70 // extension based xkb id may be provided but the xkb component extension
71 DCHECK(itor != engine_handler_map_.end() || engine_id.empty()); 71 // is not installed, for example, in browser_tests.
72 if (itor == engine_handler_map_.end()) { 72 if (itor == engine_handler_map_.end()) {
73 engine_handler_ = NULL; 73 engine_handler_ = NULL;
74 return NULL; 74 return NULL;
75 } 75 }
76 76
77 engine_handler_ = engine_handler_map_[engine_id]; 77 engine_handler_ = engine_handler_map_[engine_id];
78 return engine_handler_; 78 return engine_handler_;
79 } 79 }
80 80
81 // IMEBridge override. 81 // IMEBridge override.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 delete g_ime_bridge; 123 delete g_ime_bridge;
124 g_ime_bridge = NULL; 124 g_ime_bridge = NULL;
125 } 125 }
126 126
127 // static. 127 // static.
128 IMEBridge* IMEBridge::Get() { 128 IMEBridge* IMEBridge::Get() {
129 return g_ime_bridge; 129 return g_ime_bridge;
130 } 130 }
131 131
132 } // namespace chromeos 132 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/component_extension_ime_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698