OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "base/metrics/histogram.h" | 6 #include "base/metrics/histogram.h" |
7 #include "base/metrics/histogram_samples.h" | 7 #include "base/metrics/histogram_samples.h" |
8 #include "base/metrics/statistics_recorder.h" | 8 #include "base/metrics/statistics_recorder.h" |
9 #include "base/test/histogram_tester.h" | 9 #include "base/test/histogram_tester.h" |
10 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" | 10 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 const InputMethodEngineInterface::InputContext& context) override {} | 88 const InputMethodEngineInterface::InputContext& context) override {} |
89 void OnCandidateClicked( | 89 void OnCandidateClicked( |
90 const std::string& engine_id, | 90 const std::string& engine_id, |
91 int candidate_id, | 91 int candidate_id, |
92 InputMethodEngineInterface::MouseButtonEvent button) override {} | 92 InputMethodEngineInterface::MouseButtonEvent button) override {} |
93 void OnMenuItemActivated(const std::string& engine_id, | 93 void OnMenuItemActivated(const std::string& engine_id, |
94 const std::string& menu_id) override {} | 94 const std::string& menu_id) override {} |
95 void OnSurroundingTextChanged(const std::string& engine_id, | 95 void OnSurroundingTextChanged(const std::string& engine_id, |
96 const std::string& text, | 96 const std::string& text, |
97 int cursor_pos, | 97 int cursor_pos, |
98 int anchor_pos) override {} | 98 int anchor_pos, |
| 99 int offset) override {} |
99 void OnCompositionBoundsChanged( | 100 void OnCompositionBoundsChanged( |
100 const std::vector<gfx::Rect>& bounds) override { | 101 const std::vector<gfx::Rect>& bounds) override { |
101 calls_bitmap_ |= ONCOMPOSITIONBOUNDSCHANGED; | 102 calls_bitmap_ |= ONCOMPOSITIONBOUNDSCHANGED; |
102 } | 103 } |
103 void OnReset(const std::string& engine_id) override {} | 104 void OnReset(const std::string& engine_id) override {} |
104 | 105 |
105 unsigned char GetCallsBitmapAndReset() { | 106 unsigned char GetCallsBitmapAndReset() { |
106 unsigned char ret = calls_bitmap_; | 107 unsigned char ret = calls_bitmap_; |
107 calls_bitmap_ = NONE; | 108 calls_bitmap_ = NONE; |
108 return ret; | 109 return ret; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 // Enable/disable with focus. | 260 // Enable/disable with focus. |
260 std::vector<gfx::Rect> rects; | 261 std::vector<gfx::Rect> rects; |
261 rects.push_back(gfx::Rect()); | 262 rects.push_back(gfx::Rect()); |
262 engine_->SetCompositionBounds(rects); | 263 engine_->SetCompositionBounds(rects); |
263 EXPECT_EQ(ONCOMPOSITIONBOUNDSCHANGED, | 264 EXPECT_EQ(ONCOMPOSITIONBOUNDSCHANGED, |
264 observer_->GetCallsBitmapAndReset()); | 265 observer_->GetCallsBitmapAndReset()); |
265 } | 266 } |
266 | 267 |
267 } // namespace input_method | 268 } // namespace input_method |
268 } // namespace chromeos | 269 } // namespace chromeos |
OLD | NEW |