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

Side by Side Diff: chromeos/ime/component_extension_ime_manager.cc

Issue 495593004: Check the IME component extension's availability on linux_chromeos, so that system fallback VK can … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. 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 "chromeos/ime/component_extension_ime_manager.h" 5 #include "chromeos/ime/component_extension_ime_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "chromeos/ime/extension_ime_util.h" 9 #include "chromeos/ime/extension_ime_util.h"
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 component_extension_imes_[ext.id].engines.push_back(ime); 101 component_extension_imes_[ext.id].engines.push_back(ime);
102 input_method_id_set_.insert(input_method_id); 102 input_method_id_set_.insert(input_method_id);
103 } 103 }
104 } 104 }
105 } 105 }
106 106
107 bool ComponentExtensionIMEManager::LoadComponentExtensionIME( 107 bool ComponentExtensionIMEManager::LoadComponentExtensionIME(
108 Profile* profile, 108 Profile* profile,
109 const std::string& input_method_id) { 109 const std::string& input_method_id) {
110 ComponentExtensionIME ime; 110 ComponentExtensionIME ime;
111 if (FindEngineEntry(input_method_id, &ime)) 111 if (FindEngineEntry(input_method_id, &ime)) {
112 return delegate_->Load(profile, ime.id, ime.manifest, ime.path); 112 delegate_->Load(profile, ime.id, ime.manifest, ime.path);
113 else 113 return true;
114 return false; 114 }
115 return false;
115 } 116 }
116 117
117 bool ComponentExtensionIMEManager::UnloadComponentExtensionIME( 118 bool ComponentExtensionIMEManager::UnloadComponentExtensionIME(
118 Profile* profile, 119 Profile* profile,
119 const std::string& input_method_id) { 120 const std::string& input_method_id) {
120 ComponentExtensionIME ime; 121 ComponentExtensionIME ime;
121 if (!FindEngineEntry(input_method_id, &ime)) 122 if (!FindEngineEntry(input_method_id, &ime))
122 return false; 123 return false;
123 delegate_->Unload(profile, ime.id, ime.path); 124 delegate_->Unload(profile, ime.id, ime.path);
124 return true; 125 return true;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 bool ComponentExtensionIMEManager::IsInLoginLayoutWhitelist( 200 bool ComponentExtensionIMEManager::IsInLoginLayoutWhitelist(
200 const std::vector<std::string>& layouts) { 201 const std::vector<std::string>& layouts) {
201 for (size_t i = 0; i < layouts.size(); ++i) { 202 for (size_t i = 0; i < layouts.size(); ++i) {
202 if (login_layout_set_.find(layouts[i]) != login_layout_set_.end()) 203 if (login_layout_set_.find(layouts[i]) != login_layout_set_.end())
203 return true; 204 return true;
204 } 205 }
205 return false; 206 return false;
206 } 207 }
207 208
208 } // namespace chromeos 209 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/component_extension_ime_manager.h ('k') | chromeos/ime/mock_component_extension_ime_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698