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

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

Issue 82603002: Get rid of unused callbacks from ui::InputMethodObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise obsolete code comment Created 7 years 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "base/strings/string_number_conversions.h" 6 #include "base/strings/string_number_conversions.h"
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h" 9 #include "chrome/browser/chromeos/input_method/textinput_test_helper.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (waiting_type_ == WAIT_ON_FOCUS) 87 if (waiting_type_ == WAIT_ON_FOCUS)
88 base::MessageLoop::current()->Quit(); 88 base::MessageLoop::current()->Quit();
89 } 89 }
90 90
91 void TextInputTestHelper::OnBlur() { 91 void TextInputTestHelper::OnBlur() {
92 focus_state_ = false; 92 focus_state_ = false;
93 if (waiting_type_ == WAIT_ON_BLUR) 93 if (waiting_type_ == WAIT_ON_BLUR)
94 base::MessageLoop::current()->Quit(); 94 base::MessageLoop::current()->Quit();
95 } 95 }
96 96
97 void TextInputTestHelper::OnUntranslatedIMEMessage(
98 const base::NativeEvent& event) {
99 }
100
101 void TextInputTestHelper::OnCaretBoundsChanged( 97 void TextInputTestHelper::OnCaretBoundsChanged(
102 const ui::TextInputClient* client) { 98 const ui::TextInputClient* client) {
103 gfx::Range text_range; 99 gfx::Range text_range;
104 if (!GetTextInputClient()->GetTextRange(&text_range) || 100 if (!GetTextInputClient()->GetTextRange(&text_range) ||
105 !GetTextInputClient()->GetTextFromRange(text_range, &surrounding_text_) || 101 !GetTextInputClient()->GetTextFromRange(text_range, &surrounding_text_) ||
106 !GetTextInputClient()->GetSelectionRange(&selection_range_)) 102 !GetTextInputClient()->GetSelectionRange(&selection_range_))
107 return; 103 return;
108 if (waiting_type_ == WAIT_ON_CARET_BOUNDS_CHANGED) 104 if (waiting_type_ == WAIT_ON_CARET_BOUNDS_CHANGED)
109 base::MessageLoop::current()->Quit(); 105 base::MessageLoop::current()->Quit();
110 } 106 }
111 107
112 void TextInputTestHelper::OnInputLocaleChanged() {
113 }
114
115 void TextInputTestHelper::OnTextInputStateChanged( 108 void TextInputTestHelper::OnTextInputStateChanged(
116 const ui::TextInputClient* client) { 109 const ui::TextInputClient* client) {
117 } 110 }
118 111
119 void TextInputTestHelper::WaitForTextInputStateChanged( 112 void TextInputTestHelper::WaitForTextInputStateChanged(
120 ui::TextInputType expected_type) { 113 ui::TextInputType expected_type) {
121 CHECK_EQ(NO_WAIT, waiting_type_); 114 CHECK_EQ(NO_WAIT, waiting_type_);
122 waiting_type_ = WAIT_ON_TEXT_INPUT_TYPE_CHANGED; 115 waiting_type_ = WAIT_ON_TEXT_INPUT_TYPE_CHANGED;
123 while (latest_text_input_type_ != expected_type) 116 while (latest_text_input_type_ != expected_type)
124 content::RunMessageLoop(); 117 content::RunMessageLoop();
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 mouse_event.y = rect.CenterPoint().y(); 194 mouse_event.y = rect.CenterPoint().y();
202 mouse_event.clickCount = 1; 195 mouse_event.clickCount = 1;
203 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 196 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
204 197
205 mouse_event.type = blink::WebInputEvent::MouseUp; 198 mouse_event.type = blink::WebInputEvent::MouseUp;
206 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 199 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
207 return true; 200 return true;
208 } 201 }
209 202
210 } // namespace chromeos 203 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/textinput_test_helper.h ('k') | ui/base/ime/input_method_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698