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

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

Issue 10544070: Add decoration to the language button to indicate that a third party IME is in use (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_manager_impl.h" 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
6 6
7 #include <algorithm> // std::find 7 #include <algorithm> // std::find
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 const std::string& language) { 296 const std::string& language) {
297 if (state_ == STATE_TERMINATING) 297 if (state_ == STATE_TERMINATING)
298 return; 298 return;
299 299
300 if (!InputMethodUtil::IsExtensionInputMethod(id)) { 300 if (!InputMethodUtil::IsExtensionInputMethod(id)) {
301 DVLOG(1) << id << " is not a valid extension input method ID."; 301 DVLOG(1) << id << " is not a valid extension input method ID.";
302 return; 302 return;
303 } 303 }
304 304
305 const std::string layout = layouts.empty() ? "" : layouts[0]; 305 const std::string layout = layouts.empty() ? "" : layouts[0];
306 extra_input_methods_[id] = InputMethodDescriptor(id, name, layout, language); 306 extra_input_methods_[id] =
307 InputMethodDescriptor(id, name, layout, language, true);
307 308
308 if (!Contains(active_input_method_ids_, id)) { 309 if (!Contains(active_input_method_ids_, id)) {
309 active_input_method_ids_.push_back(id); 310 active_input_method_ids_.push_back(id);
310 } else { 311 } else {
311 DVLOG(1) << "AddInputMethodExtension: alread added: " 312 DVLOG(1) << "AddInputMethodExtension: alread added: "
312 << id << ", " << name; 313 << id << ", " << name;
313 // Call Start() anyway, just in case. 314 // Call Start() anyway, just in case.
314 } 315 }
315 316
316 // Ensure that the input method daemon is running. 317 // Ensure that the input method daemon is running.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 DVLOG(1) << "Failed to initialize the candidate window controller"; 597 DVLOG(1) << "Failed to initialize the candidate window controller";
597 } 598 }
598 599
599 // static 600 // static
600 InputMethodManagerImpl* InputMethodManagerImpl::GetInstanceForTesting() { 601 InputMethodManagerImpl* InputMethodManagerImpl::GetInstanceForTesting() {
601 return new InputMethodManagerImpl; 602 return new InputMethodManagerImpl;
602 } 603 }
603 604
604 } // namespace input_method 605 } // namespace input_method
605 } // namespace chromeos 606 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698