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 <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor(); | 864 component_extension_ime_manager_->GetAllIMEAsInputMethodDescriptor(); |
865 util_.ResetInputMethods(descriptors); | 865 util_.ResetInputMethods(descriptors); |
866 } | 866 } |
867 | 867 |
868 InputMethodManagerImpl::~InputMethodManagerImpl() { | 868 InputMethodManagerImpl::~InputMethodManagerImpl() { |
869 if (candidate_window_controller_.get()) | 869 if (candidate_window_controller_.get()) |
870 candidate_window_controller_->RemoveObserver(this); | 870 candidate_window_controller_->RemoveObserver(this); |
871 } | 871 } |
872 | 872 |
873 void InputMethodManagerImpl::RecordInputMethodUsage( | 873 void InputMethodManagerImpl::RecordInputMethodUsage( |
874 std::string input_method_id) { | 874 const std::string& input_method_id) { |
875 UMA_HISTOGRAM_ENUMERATION("InputMethod.Category", | 875 UMA_HISTOGRAM_ENUMERATION("InputMethod.Category", |
876 GetInputMethodCategory(input_method_id), | 876 GetInputMethodCategory(input_method_id), |
877 INPUT_METHOD_CATEGORY_MAX); | 877 INPUT_METHOD_CATEGORY_MAX); |
878 UMA_HISTOGRAM_SPARSE_SLOWLY( | 878 UMA_HISTOGRAM_SPARSE_SLOWLY( |
879 "InputMethod.ID2", static_cast<int32_t>(base::Hash(input_method_id))); | 879 "InputMethod.ID2", static_cast<int32_t>(base::Hash(input_method_id))); |
880 } | 880 } |
881 | 881 |
882 void InputMethodManagerImpl::AddObserver( | 882 void InputMethodManagerImpl::AddObserver( |
883 InputMethodManager::Observer* observer) { | 883 InputMethodManager::Observer* observer) { |
884 observers_.AddObserver(observer); | 884 observers_.AddObserver(observer); |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 if (candidate_window_controller_.get()) | 1157 if (candidate_window_controller_.get()) |
1158 return; | 1158 return; |
1159 | 1159 |
1160 candidate_window_controller_.reset( | 1160 candidate_window_controller_.reset( |
1161 CandidateWindowController::CreateCandidateWindowController()); | 1161 CandidateWindowController::CreateCandidateWindowController()); |
1162 candidate_window_controller_->AddObserver(this); | 1162 candidate_window_controller_->AddObserver(this); |
1163 } | 1163 } |
1164 | 1164 |
1165 } // namespace input_method | 1165 } // namespace input_method |
1166 } // namespace chromeos | 1166 } // namespace chromeos |
OLD | NEW |