| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 void MockInputMethod::DetachTextInputClient(TextInputClient* client) { | 27 void MockInputMethod::DetachTextInputClient(TextInputClient* client) { |
| 28 if (text_input_client_ == client) { | 28 if (text_input_client_ == client) { |
| 29 text_input_client_ = NULL; | 29 text_input_client_ = NULL; |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 | 32 |
| 33 TextInputClient* MockInputMethod::GetTextInputClient() const { | 33 TextInputClient* MockInputMethod::GetTextInputClient() const { |
| 34 return text_input_client_; | 34 return text_input_client_; |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool MockInputMethod::DispatchKeyEvent(const base::NativeEvent& native_event) { | 37 bool MockInputMethod::DispatchKeyEvent(const ui::KeyEvent& event) { |
| 38 return false; | 38 return false; |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool MockInputMethod::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) { | 41 bool MockInputMethod::DispatchFabricatedKeyEvent(const ui::KeyEvent& event) { |
| 42 return false; | 42 return false; |
| 43 } | 43 } |
| 44 | 44 |
| 45 void MockInputMethod::Init(bool focused) { | 45 void MockInputMethod::Init(bool focused) { |
| 46 } | 46 } |
| 47 | 47 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 void MockInputMethod::AddObserver(InputMethodObserver* observer) { | 118 void MockInputMethod::AddObserver(InputMethodObserver* observer) { |
| 119 observer_list_.AddObserver(observer); | 119 observer_list_.AddObserver(observer); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void MockInputMethod::RemoveObserver(InputMethodObserver* observer) { | 122 void MockInputMethod::RemoveObserver(InputMethodObserver* observer) { |
| 123 observer_list_.RemoveObserver(observer); | 123 observer_list_.RemoveObserver(observer); |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace ui | 126 } // namespace ui |
| OLD | NEW |