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

Side by Side Diff: trunk/src/ui/views/ime/mock_input_method.h

Issue 23710009: Revert 219673 "Fix Views Combobox and Tree View text input." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef UI_VIEWS_IME_MOCK_INPUT_METHOD_H_ 5 #ifndef UI_VIEWS_IME_MOCK_INPUT_METHOD_H_
6 #define UI_VIEWS_IME_MOCK_INPUT_METHOD_H_ 6 #define UI_VIEWS_IME_MOCK_INPUT_METHOD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "ui/base/ime/composition_text.h" 12 #include "ui/base/ime/composition_text.h"
13 #include "ui/views/ime/input_method_base.h" 13 #include "ui/views/ime/input_method_base.h"
14 #include "ui/views/view.h" 14 #include "ui/views/view.h"
15 15
16 namespace views { 16 namespace views {
17 17
18 // A mock InputMethod implementation for testing purpose. 18 // A mock InputMethod implementation for testing purpose.
19 class VIEWS_EXPORT MockInputMethod : public InputMethodBase { 19 class VIEWS_EXPORT MockInputMethod : public InputMethodBase {
20 public: 20 public:
21 MockInputMethod(); 21 MockInputMethod();
22 explicit MockInputMethod(internal::InputMethodDelegate* delegate); 22 explicit MockInputMethod(internal::InputMethodDelegate* delegate);
23 virtual ~MockInputMethod(); 23 virtual ~MockInputMethod();
24 24
25 // Overridden from InputMethod: 25 // Overridden from InputMethod:
26 virtual void Init(Widget* widget) OVERRIDE; 26 virtual void Init(Widget* widget) OVERRIDE;
27 virtual void OnFocus() OVERRIDE;
28 virtual void OnBlur() OVERRIDE;
27 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event, 29 virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
28 NativeEventResult* result) OVERRIDE; 30 NativeEventResult* result) OVERRIDE;
29 virtual void DispatchKeyEvent(const ui::KeyEvent& key) OVERRIDE; 31 virtual void DispatchKeyEvent(const ui::KeyEvent& key) OVERRIDE;
30 virtual void OnTextInputTypeChanged(View* view) OVERRIDE; 32 virtual void OnTextInputTypeChanged(View* view) OVERRIDE;
31 virtual void OnCaretBoundsChanged(View* view) OVERRIDE; 33 virtual void OnCaretBoundsChanged(View* view) OVERRIDE;
32 virtual void CancelComposition(View* view) OVERRIDE; 34 virtual void CancelComposition(View* view) OVERRIDE;
33 virtual void OnInputLocaleChanged() OVERRIDE; 35 virtual void OnInputLocaleChanged() OVERRIDE;
34 virtual std::string GetInputLocale() OVERRIDE; 36 virtual std::string GetInputLocale() OVERRIDE;
35 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE; 37 virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE;
36 virtual bool IsActive() OVERRIDE; 38 virtual bool IsActive() OVERRIDE;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 std::string locale_; 90 std::string locale_;
89 base::i18n::TextDirection direction_; 91 base::i18n::TextDirection direction_;
90 bool active_; 92 bool active_;
91 93
92 DISALLOW_COPY_AND_ASSIGN(MockInputMethod); 94 DISALLOW_COPY_AND_ASSIGN(MockInputMethod);
93 }; 95 };
94 96
95 } // namespace views 97 } // namespace views
96 98
97 #endif // UI_VIEWS_IME_MOCK_INPUT_METHOD_H_ 99 #endif // UI_VIEWS_IME_MOCK_INPUT_METHOD_H_
OLDNEW
« no previous file with comments | « trunk/src/ui/views/ime/input_method_bridge_unittest.cc ('k') | trunk/src/ui/views/ime/mock_input_method.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698