OLD | NEW |
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/bind.h" | 10 #include "base/bind.h" |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 if (!extension_ime_util::IsExtensionIME(id) && | 387 if (!extension_ime_util::IsExtensionIME(id) && |
388 !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) { | 388 !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) { |
389 DVLOG(1) << id << " is not a valid extension input method ID."; | 389 DVLOG(1) << id << " is not a valid extension input method ID."; |
390 return; | 390 return; |
391 } | 391 } |
392 | 392 |
393 const std::string layout = layouts.empty() ? "" : layouts[0]; | 393 const std::string layout = layouts.empty() ? "" : layouts[0]; |
394 // TODO(nona): Support options page for normal extension ime. | 394 // TODO(nona): Support options page for normal extension ime. |
395 // crbug.com/156283. | 395 // crbug.com/156283. |
396 extra_input_methods_[id] = | 396 extra_input_methods_[id] = |
397 InputMethodDescriptor(id, name, layout, language, "", true); | 397 InputMethodDescriptor(id, name, layout, language, ""); |
398 if (!Contains(filtered_extension_imes_, id) && | 398 if (!Contains(filtered_extension_imes_, id) && |
399 !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) { | 399 !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) { |
400 if (!Contains(active_input_method_ids_, id)) { | 400 if (!Contains(active_input_method_ids_, id)) { |
401 active_input_method_ids_.push_back(id); | 401 active_input_method_ids_.push_back(id); |
402 } else { | 402 } else { |
403 DVLOG(1) << "AddInputMethodExtension: alread added: " | 403 DVLOG(1) << "AddInputMethodExtension: alread added: " |
404 << id << ", " << name; | 404 << id << ", " << name; |
405 // Call Start() anyway, just in case. | 405 // Call Start() anyway, just in case. |
406 } | 406 } |
407 | 407 |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 candidate_window_controller_.reset( | 794 candidate_window_controller_.reset( |
795 CandidateWindowController::CreateCandidateWindowController()); | 795 CandidateWindowController::CreateCandidateWindowController()); |
796 if (candidate_window_controller_->Init(ibus_controller_.get())) | 796 if (candidate_window_controller_->Init(ibus_controller_.get())) |
797 candidate_window_controller_->AddObserver(this); | 797 candidate_window_controller_->AddObserver(this); |
798 else | 798 else |
799 DVLOG(1) << "Failed to initialize the candidate window controller"; | 799 DVLOG(1) << "Failed to initialize the candidate window controller"; |
800 } | 800 } |
801 | 801 |
802 } // namespace input_method | 802 } // namespace input_method |
803 } // namespace chromeos | 803 } // namespace chromeos |
OLD | NEW |