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

Side by Side Diff: ui/base/ime/mock_input_method.cc

Issue 20526005: Implement virtual keyboard hiding. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Init Created 7 years, 4 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
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 29 matching lines...) Expand all
40 } 40 }
41 41
42 void MockInputMethod::OnFocus() { 42 void MockInputMethod::OnFocus() {
43 FOR_EACH_OBSERVER(Observer, observer_list_, OnFocus()); 43 FOR_EACH_OBSERVER(Observer, observer_list_, OnFocus());
44 } 44 }
45 45
46 void MockInputMethod::OnBlur() { 46 void MockInputMethod::OnBlur() {
47 FOR_EACH_OBSERVER(Observer, observer_list_, OnBlur()); 47 FOR_EACH_OBSERVER(Observer, observer_list_, OnBlur());
48 } 48 }
49 49
50 void MockInputMethod::OnPossibleRefocus() {
51 FOR_EACH_OBSERVER(Observer, observer_list_, OnPossibleRefocus());
52 }
53
50 bool MockInputMethod::OnUntranslatedIMEMessage(const base::NativeEvent& event, 54 bool MockInputMethod::OnUntranslatedIMEMessage(const base::NativeEvent& event,
51 NativeEventResult* result) { 55 NativeEventResult* result) {
52 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntranslatedIMEMessage(event)); 56 FOR_EACH_OBSERVER(Observer, observer_list_, OnUntranslatedIMEMessage(event));
53 if (result) 57 if (result)
54 *result = NativeEventResult(); 58 *result = NativeEventResult();
55 return false; 59 return false;
56 } 60 }
57 61
58 void MockInputMethod::OnTextInputTypeChanged(const TextInputClient* client) { 62 void MockInputMethod::OnTextInputTypeChanged(const TextInputClient* client) {
59 FOR_EACH_OBSERVER(Observer, observer_list_, OnTextInputTypeChanged(client)); 63 FOR_EACH_OBSERVER(Observer, observer_list_, OnTextInputTypeChanged(client));
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 101
98 void MockInputMethod::AddObserver(InputMethodObserver* observer) { 102 void MockInputMethod::AddObserver(InputMethodObserver* observer) {
99 observer_list_.AddObserver(static_cast<Observer*>(observer)); 103 observer_list_.AddObserver(static_cast<Observer*>(observer));
100 } 104 }
101 105
102 void MockInputMethod::RemoveObserver(InputMethodObserver* observer) { 106 void MockInputMethod::RemoveObserver(InputMethodObserver* observer) {
103 observer_list_.RemoveObserver(static_cast<Observer*>(observer)); 107 observer_list_.RemoveObserver(static_cast<Observer*>(observer));
104 } 108 }
105 109
106 } // namespace ui 110 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698