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

Side by Side Diff: ui/base/ime/mock_input_method.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
« no previous file with comments | « ui/base/ime/input_method_win.cc ('k') | ui/base/ime/remote_input_method_win.cc » ('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 (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 "ui/base/ime/mock_input_method.h" 5 #include "ui/base/ime/mock_input_method.h"
6 6
7 namespace ui { 7 namespace ui {
8 8
9 MockInputMethod::MockInputMethod(internal::InputMethodDelegate* delegate) 9 MockInputMethod::MockInputMethod(internal::InputMethodDelegate* delegate)
10 : text_input_client_(NULL) { 10 : text_input_client_(NULL) {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void MockInputMethod::OnFocus() { 44 void MockInputMethod::OnFocus() {
45 FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnFocus()); 45 FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnFocus());
46 } 46 }
47 47
48 void MockInputMethod::OnBlur() { 48 void MockInputMethod::OnBlur() {
49 FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnBlur()); 49 FOR_EACH_OBSERVER(InputMethodObserver, observer_list_, OnBlur());
50 } 50 }
51 51
52 bool MockInputMethod::OnUntranslatedIMEMessage(const base::NativeEvent& event, 52 bool MockInputMethod::OnUntranslatedIMEMessage(const base::NativeEvent& event,
53 NativeEventResult* result) { 53 NativeEventResult* result) {
54 FOR_EACH_OBSERVER(InputMethodObserver,
55 observer_list_,
56 OnUntranslatedIMEMessage(event));
57 if (result) 54 if (result)
58 *result = NativeEventResult(); 55 *result = NativeEventResult();
59 return false; 56 return false;
60 } 57 }
61 58
62 void MockInputMethod::OnTextInputTypeChanged(const TextInputClient* client) { 59 void MockInputMethod::OnTextInputTypeChanged(const TextInputClient* client) {
63 FOR_EACH_OBSERVER(InputMethodObserver, 60 FOR_EACH_OBSERVER(InputMethodObserver,
64 observer_list_, 61 observer_list_,
65 OnTextInputTypeChanged(client)); 62 OnTextInputTypeChanged(client));
66 FOR_EACH_OBSERVER(InputMethodObserver, 63 FOR_EACH_OBSERVER(InputMethodObserver,
67 observer_list_, 64 observer_list_,
68 OnTextInputStateChanged(client)); 65 OnTextInputStateChanged(client));
69 } 66 }
70 67
71 void MockInputMethod::OnCaretBoundsChanged(const TextInputClient* client) { 68 void MockInputMethod::OnCaretBoundsChanged(const TextInputClient* client) {
72 FOR_EACH_OBSERVER(InputMethodObserver, 69 FOR_EACH_OBSERVER(InputMethodObserver,
73 observer_list_, 70 observer_list_,
74 OnCaretBoundsChanged(client)); 71 OnCaretBoundsChanged(client));
75 } 72 }
76 73
77 void MockInputMethod::CancelComposition(const TextInputClient* client) { 74 void MockInputMethod::CancelComposition(const TextInputClient* client) {
78 } 75 }
79 76
80 void MockInputMethod::OnInputLocaleChanged() { 77 void MockInputMethod::OnInputLocaleChanged() {
81 FOR_EACH_OBSERVER(InputMethodObserver,
82 observer_list_,
83 OnInputLocaleChanged());
84 } 78 }
85 79
86 std::string MockInputMethod::GetInputLocale() { 80 std::string MockInputMethod::GetInputLocale() {
87 return ""; 81 return "";
88 } 82 }
89 83
90 base::i18n::TextDirection MockInputMethod::GetInputTextDirection() { 84 base::i18n::TextDirection MockInputMethod::GetInputTextDirection() {
91 return base::i18n::UNKNOWN_DIRECTION; 85 return base::i18n::UNKNOWN_DIRECTION;
92 } 86 }
93 87
(...skipping 19 matching lines...) Expand all
113 107
114 void MockInputMethod::AddObserver(InputMethodObserver* observer) { 108 void MockInputMethod::AddObserver(InputMethodObserver* observer) {
115 observer_list_.AddObserver(observer); 109 observer_list_.AddObserver(observer);
116 } 110 }
117 111
118 void MockInputMethod::RemoveObserver(InputMethodObserver* observer) { 112 void MockInputMethod::RemoveObserver(InputMethodObserver* observer) {
119 observer_list_.RemoveObserver(observer); 113 observer_list_.RemoveObserver(observer);
120 } 114 }
121 115
122 } // namespace ui 116 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/input_method_win.cc ('k') | ui/base/ime/remote_input_method_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698