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

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

Issue 448923003: Clean up useless code in InputMethodManagerImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_manager_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/ime/input_method_menu_item.h" 9 #include "ash/ime/input_method_menu_item.h"
10 #include "ash/ime/input_method_menu_manager.h" 10 #include "ash/ime/input_method_menu_manager.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 bool InputMethodManagerImpl::MigrateInputMethods( 54 bool InputMethodManagerImpl::MigrateInputMethods(
55 std::vector<std::string>* input_method_ids) { 55 std::vector<std::string>* input_method_ids) {
56 return util_.MigrateInputMethods(input_method_ids); 56 return util_.MigrateInputMethods(input_method_ids);
57 } 57 }
58 58
59 InputMethodManagerImpl::InputMethodManagerImpl( 59 InputMethodManagerImpl::InputMethodManagerImpl(
60 scoped_ptr<InputMethodDelegate> delegate) 60 scoped_ptr<InputMethodDelegate> delegate)
61 : delegate_(delegate.Pass()), 61 : delegate_(delegate.Pass()),
62 state_(STATE_LOGIN_SCREEN), 62 state_(STATE_LOGIN_SCREEN),
63 util_(delegate_.get()), 63 util_(delegate_.get()),
64 component_extension_ime_manager_(new ComponentExtensionIMEManager()), 64 component_extension_ime_manager_(new ComponentExtensionIMEManager()) {
65 weak_ptr_factory_(this) {
66 if (base::SysInfo::IsRunningOnChromeOS()) 65 if (base::SysInfo::IsRunningOnChromeOS())
67 keyboard_.reset(ImeKeyboard::Create()); 66 keyboard_.reset(ImeKeyboard::Create());
68 else 67 else
69 keyboard_.reset(new FakeImeKeyboard()); 68 keyboard_.reset(new FakeImeKeyboard());
70 } 69 }
71 70
72 InputMethodManagerImpl::~InputMethodManagerImpl() { 71 InputMethodManagerImpl::~InputMethodManagerImpl() {
73 if (candidate_window_controller_.get()) 72 if (candidate_window_controller_.get())
74 candidate_window_controller_->RemoveObserver(this); 73 candidate_window_controller_->RemoveObserver(this);
75 } 74 }
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 ImeKeyboard* InputMethodManagerImpl::GetImeKeyboard() { 782 ImeKeyboard* InputMethodManagerImpl::GetImeKeyboard() {
784 return keyboard_.get(); 783 return keyboard_.get();
785 } 784 }
786 785
787 InputMethodUtil* InputMethodManagerImpl::GetInputMethodUtil() { 786 InputMethodUtil* InputMethodManagerImpl::GetInputMethodUtil() {
788 return &util_; 787 return &util_;
789 } 788 }
790 789
791 ComponentExtensionIMEManager* 790 ComponentExtensionIMEManager*
792 InputMethodManagerImpl::GetComponentExtensionIMEManager() { 791 InputMethodManagerImpl::GetComponentExtensionIMEManager() {
793 DCHECK(thread_checker_.CalledOnValidThread());
794 return component_extension_ime_manager_.get(); 792 return component_extension_ime_manager_.get();
795 } 793 }
796 794
797 void InputMethodManagerImpl::InitializeComponentExtension() { 795 void InputMethodManagerImpl::InitializeComponentExtension() {
798 scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate( 796 scoped_ptr<ComponentExtensionIMEManagerDelegate> delegate(
799 new ComponentExtensionIMEManagerImpl()); 797 new ComponentExtensionIMEManagerImpl());
800 component_extension_ime_manager_->Initialize(delegate.Pass()); 798 component_extension_ime_manager_->Initialize(delegate.Pass());
801 799
802 util_.ResetInputMethods( 800 util_.ResetInputMethods(
803 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor()); 801 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor());
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 if (candidate_window_controller_.get()) 889 if (candidate_window_controller_.get())
892 return; 890 return;
893 891
894 candidate_window_controller_.reset( 892 candidate_window_controller_.reset(
895 CandidateWindowController::CreateCandidateWindowController()); 893 CandidateWindowController::CreateCandidateWindowController());
896 candidate_window_controller_->AddObserver(this); 894 candidate_window_controller_->AddObserver(this);
897 } 895 }
898 896
899 } // namespace input_method 897 } // namespace input_method
900 } // namespace chromeos 898 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_manager_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698