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

Side by Side Diff: chrome/browser/chromeos/input_method/input_method_engine.cc

Issue 389913002: Moving IME manifests to chrome resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed duplicated XKB extension loading. Created 6 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/chromeos/input_method/input_method_engine.h" 5 #include "chrome/browser/chromeos/input_method/input_method_engine.h"
6 6
7 #undef FocusIn 7 #undef FocusIn
8 #undef FocusOut 8 #undef FocusOut
9 #undef RootWindow 9 #undef RootWindow
10 #include <map> 10 #include <map>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // TODO(komatsu): It is probably better to set observer out of Initialize. 141 // TODO(komatsu): It is probably better to set observer out of Initialize.
142 observer_ = observer.Pass(); 142 observer_ = observer.Pass();
143 engine_id_ = engine_id; 143 engine_id_ = engine_id;
144 extension_id_ = extension_id; 144 extension_id_ = extension_id;
145 145
146 input_method::InputMethodManager* manager = 146 input_method::InputMethodManager* manager =
147 input_method::InputMethodManager::Get(); 147 input_method::InputMethodManager::Get();
148 ComponentExtensionIMEManager* comp_ext_ime_manager = 148 ComponentExtensionIMEManager* comp_ext_ime_manager =
149 manager->GetComponentExtensionIMEManager(); 149 manager->GetComponentExtensionIMEManager();
150 150
151 if (comp_ext_ime_manager && comp_ext_ime_manager->IsInitialized() && 151 if (comp_ext_ime_manager->IsWhitelistedExtension(extension_id)) {
152 comp_ext_ime_manager->IsWhitelistedExtension(extension_id)) {
153 imm_id_ = comp_ext_ime_manager->GetId(extension_id, engine_id); 152 imm_id_ = comp_ext_ime_manager->GetId(extension_id, engine_id);
154 } else { 153 } else {
155 imm_id_ = extension_ime_util::GetInputMethodID(extension_id, engine_id); 154 imm_id_ = extension_ime_util::GetInputMethodID(extension_id, engine_id);
156 } 155 }
157 156
158 input_view_url_ = input_view; 157 input_view_url_ = input_view;
159 descriptor_ = input_method::InputMethodDescriptor( 158 descriptor_ = input_method::InputMethodDescriptor(
160 imm_id_, 159 imm_id_,
161 engine_name, 160 engine_name,
162 std::string(), // TODO(uekawa): Set short name. 161 std::string(), // TODO(uekawa): Set short name.
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 // TODO(nona): Implement it. 668 // TODO(nona): Implement it.
670 break; 669 break;
671 } 670 }
672 } 671 }
673 } 672 }
674 673
675 // TODO(nona): Support item.children. 674 // TODO(nona): Support item.children.
676 } 675 }
677 676
678 } // namespace chromeos 677 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698