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

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

Issue 10388181: Remove virtual keyboard support from input_method_descriptor.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years, 7 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 const std::vector<std::string>& layouts, 289 const std::vector<std::string>& layouts,
290 const std::string& language) { 290 const std::string& language) {
291 if (state_ == STATE_TERMINATING) 291 if (state_ == STATE_TERMINATING)
292 return; 292 return;
293 293
294 if (!InputMethodUtil::IsExtensionInputMethod(id)) { 294 if (!InputMethodUtil::IsExtensionInputMethod(id)) {
295 DVLOG(1) << id << " is not a valid extension input method ID."; 295 DVLOG(1) << id << " is not a valid extension input method ID.";
296 return; 296 return;
297 } 297 }
298 298
299 const std::string virtual_layouts = JoinString(layouts, ','); 299 const std::string layout = layouts.empty() ? "" : layouts[0];
300 extra_input_methods_[id] = InputMethodDescriptor( 300 extra_input_methods_[id] = InputMethodDescriptor(id, name, layout, language);
301 whitelist_, id, name, virtual_layouts, language);
302 301
303 if (!Contains(active_input_method_ids_, id)) { 302 if (!Contains(active_input_method_ids_, id)) {
304 active_input_method_ids_.push_back(id); 303 active_input_method_ids_.push_back(id);
305 } else { 304 } else {
306 DVLOG(1) << "AddInputMethodExtension: alread added: " 305 DVLOG(1) << "AddInputMethodExtension: alread added: "
307 << id << ", " << name; 306 << id << ", " << name;
308 // Call Start() anyway, just in case. 307 // Call Start() anyway, just in case.
309 } 308 }
310 309
311 // Ensure that the input method daemon is running. 310 // Ensure that the input method daemon is running.
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 DVLOG(1) << "Failed to initialize the candidate window controller"; 591 DVLOG(1) << "Failed to initialize the candidate window controller";
593 } 592 }
594 593
595 // static 594 // static
596 InputMethodManagerImpl* InputMethodManagerImpl::GetInstanceForTesting() { 595 InputMethodManagerImpl* InputMethodManagerImpl::GetInstanceForTesting() {
597 return new InputMethodManagerImpl; 596 return new InputMethodManagerImpl;
598 } 597 }
599 598
600 } // namespace input_method 599 } // namespace input_method
601 } // namespace chromeos 600 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698