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

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

Issue 2597413002: Makes the InputMethodEngine can be switched per profile when the top-level browser window is switch… (Closed)
Patch Set: . Created 3 years, 12 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 | « no previous file | chrome/browser/chromeos/input_method/mock_input_method_engine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "chrome/browser/chromeos/input_method/input_method_engine.h" 5 #include "chrome/browser/chromeos/input_method/input_method_engine.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const std::string& engine_id, 99 const std::string& engine_id,
100 int candidate_id, 100 int candidate_id,
101 InputMethodEngineBase::MouseButtonEvent button) override {} 101 InputMethodEngineBase::MouseButtonEvent button) override {}
102 void OnMenuItemActivated(const std::string& engine_id, 102 void OnMenuItemActivated(const std::string& engine_id,
103 const std::string& menu_id) override {} 103 const std::string& menu_id) override {}
104 void OnSurroundingTextChanged(const std::string& engine_id, 104 void OnSurroundingTextChanged(const std::string& engine_id,
105 const std::string& text, 105 const std::string& text,
106 int cursor_pos, 106 int cursor_pos,
107 int anchor_pos, 107 int anchor_pos,
108 int offset) override {} 108 int offset) override {}
109 void OnRequestEngineSwitch() override {}
109 void OnCompositionBoundsChanged( 110 void OnCompositionBoundsChanged(
110 const std::vector<gfx::Rect>& bounds) override { 111 const std::vector<gfx::Rect>& bounds) override {
111 calls_bitmap_ |= ONCOMPOSITIONBOUNDSCHANGED; 112 calls_bitmap_ |= ONCOMPOSITIONBOUNDSCHANGED;
112 } 113 }
113 void OnReset(const std::string& engine_id) override {} 114 void OnReset(const std::string& engine_id) override {}
114 115
115 unsigned char GetCallsBitmapAndReset() { 116 unsigned char GetCallsBitmapAndReset() {
116 unsigned char ret = calls_bitmap_; 117 unsigned char ret = calls_bitmap_;
117 calls_bitmap_ = NONE; 118 calls_bitmap_ = NONE;
118 return ret; 119 return ret;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 CreateEngine(true); 272 CreateEngine(true);
272 // Enable/disable with focus. 273 // Enable/disable with focus.
273 std::vector<gfx::Rect> rects; 274 std::vector<gfx::Rect> rects;
274 rects.push_back(gfx::Rect()); 275 rects.push_back(gfx::Rect());
275 engine_->SetCompositionBounds(rects); 276 engine_->SetCompositionBounds(rects);
276 EXPECT_EQ(ONCOMPOSITIONBOUNDSCHANGED, observer_->GetCallsBitmapAndReset()); 277 EXPECT_EQ(ONCOMPOSITIONBOUNDSCHANGED, observer_->GetCallsBitmapAndReset());
277 } 278 }
278 279
279 } // namespace input_method 280 } // namespace input_method
280 } // namespace chromeos 281 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/mock_input_method_engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698