Chromium Code Reviews| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 372 if (state_ == STATE_TERMINATING) | 372 if (state_ == STATE_TERMINATING) |
| 373 return; | 373 return; |
| 374 | 374 |
| 375 if (!extension_ime_util::IsExtensionIME(id) && | 375 if (!extension_ime_util::IsExtensionIME(id) && |
| 376 !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) { | 376 !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) { |
| 377 DVLOG(1) << id << " is not a valid extension input method ID."; | 377 DVLOG(1) << id << " is not a valid extension input method ID."; |
| 378 return; | 378 return; |
| 379 } | 379 } |
| 380 | 380 |
| 381 const std::string layout = layouts.empty() ? "" : layouts[0]; | 381 const std::string layout = layouts.empty() ? "" : layouts[0]; |
| 382 // TODO(nona): Support options page for normal extension ime. | |
|
satorux1
2013/04/15 04:16:08
please add a bug URL
Seigo Nonaka
2013/04/15 04:25:53
Done.
| |
| 382 extra_input_methods_[id] = | 383 extra_input_methods_[id] = |
| 383 InputMethodDescriptor(id, name, layout, language, true); | 384 InputMethodDescriptor(id, name, layout, language, "", true); |
| 384 if (!Contains(filtered_extension_imes_, id) && | 385 if (!Contains(filtered_extension_imes_, id) && |
| 385 !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) { | 386 !ComponentExtensionIMEManager::IsComponentExtensionIMEId(id)) { |
| 386 if (!Contains(active_input_method_ids_, id)) { | 387 if (!Contains(active_input_method_ids_, id)) { |
| 387 active_input_method_ids_.push_back(id); | 388 active_input_method_ids_.push_back(id); |
| 388 } else { | 389 } else { |
| 389 DVLOG(1) << "AddInputMethodExtension: alread added: " | 390 DVLOG(1) << "AddInputMethodExtension: alread added: " |
| 390 << id << ", " << name; | 391 << id << ", " << name; |
| 391 // Call Start() anyway, just in case. | 392 // Call Start() anyway, just in case. |
| 392 } | 393 } |
| 393 | 394 |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 780 candidate_window_controller_.reset( | 781 candidate_window_controller_.reset( |
| 781 CandidateWindowController::CreateCandidateWindowController()); | 782 CandidateWindowController::CreateCandidateWindowController()); |
| 782 if (candidate_window_controller_->Init(ibus_controller_.get())) | 783 if (candidate_window_controller_->Init(ibus_controller_.get())) |
| 783 candidate_window_controller_->AddObserver(this); | 784 candidate_window_controller_->AddObserver(this); |
| 784 else | 785 else |
| 785 DVLOG(1) << "Failed to initialize the candidate window controller"; | 786 DVLOG(1) << "Failed to initialize the candidate window controller"; |
| 786 } | 787 } |
| 787 | 788 |
| 788 } // namespace input_method | 789 } // namespace input_method |
| 789 } // namespace chromeos | 790 } // namespace chromeos |
| OLD | NEW |