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> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 public ui::ime::InputMethodMenuManager::Observer { | 64 public ui::ime::InputMethodMenuManager::Observer { |
65 public: | 65 public: |
66 TestObserver() | 66 TestObserver() |
67 : input_method_changed_count_(0), | 67 : input_method_changed_count_(0), |
68 input_method_menu_item_changed_count_(0), | 68 input_method_menu_item_changed_count_(0), |
69 last_show_message_(false) { | 69 last_show_message_(false) { |
70 } | 70 } |
71 ~TestObserver() override {} | 71 ~TestObserver() override {} |
72 | 72 |
73 void InputMethodChanged(InputMethodManager* manager, | 73 void InputMethodChanged(InputMethodManager* manager, |
| 74 Profile* /* profile */, |
74 bool show_message) override { | 75 bool show_message) override { |
75 ++input_method_changed_count_; | 76 ++input_method_changed_count_; |
76 last_show_message_ = show_message; | 77 last_show_message_ = show_message; |
77 } | 78 } |
78 void InputMethodMenuItemChanged( | 79 void InputMethodMenuItemChanged( |
79 ui::ime::InputMethodMenuManager* manager) override { | 80 ui::ime::InputMethodMenuManager* manager) override { |
80 ++input_method_menu_item_changed_count_; | 81 ++input_method_menu_item_changed_count_; |
81 } | 82 } |
82 | 83 |
83 int input_method_changed_count_; | 84 int input_method_changed_count_; |
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 ASSERT_EQ(4U, input_method_ids.size()); | 1362 ASSERT_EQ(4U, input_method_ids.size()); |
1362 | 1363 |
1363 EXPECT_EQ(ImeIdFromEngineId("xkb:us::eng"), input_method_ids[0]); | 1364 EXPECT_EQ(ImeIdFromEngineId("xkb:us::eng"), input_method_ids[0]); |
1364 EXPECT_EQ(ImeIdFromEngineId("xkb:fr::fra"), input_method_ids[1]); | 1365 EXPECT_EQ(ImeIdFromEngineId("xkb:fr::fra"), input_method_ids[1]); |
1365 EXPECT_EQ("_comp_ime_asdf_pinyin", input_method_ids[2]); | 1366 EXPECT_EQ("_comp_ime_asdf_pinyin", input_method_ids[2]); |
1366 EXPECT_EQ(ImeIdFromEngineId("zh-t-i0-pinyin"), input_method_ids[3]); | 1367 EXPECT_EQ(ImeIdFromEngineId("zh-t-i0-pinyin"), input_method_ids[3]); |
1367 } | 1368 } |
1368 | 1369 |
1369 } // namespace input_method | 1370 } // namespace input_method |
1370 } // namespace chromeos | 1371 } // namespace chromeos |
OLD | NEW |