OLD | NEW |
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 VIEWS_IME_INPUT_METHOD_BASE_H_ | 5 #ifndef VIEWS_IME_INPUT_METHOD_BASE_H_ |
6 #define VIEWS_IME_INPUT_METHOD_BASE_H_ | 6 #define VIEWS_IME_INPUT_METHOD_BASE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "views/focus/focus_manager.h" | 11 #include "views/focus/focus_manager.h" |
12 #include "views/ime/input_method.h" | 12 #include "views/ime/input_method.h" |
13 #include "views/ime/input_method_delegate.h" | 13 #include "views/ime/input_method_delegate.h" |
14 #include "views/ime/text_input_client.h" | 14 |
| 15 namespace gfx { |
| 16 class Rect; |
| 17 } // namespace gfx |
| 18 |
| 19 namespace ui { |
| 20 class TextInputClient; |
| 21 } // namespace ui |
15 | 22 |
16 namespace views { | 23 namespace views { |
17 | 24 |
18 class View; | 25 class View; |
19 | 26 |
20 // A helper class providing functionalities shared among InputMethod | 27 // A helper class providing functionalities shared among InputMethod |
21 // implementations. | 28 // implementations. |
22 class VIEWS_EXPORT InputMethodBase : public InputMethod, | 29 class VIEWS_EXPORT InputMethodBase : public InputMethod, |
23 public FocusChangeListener { | 30 public FocusChangeListener { |
24 public: | 31 public: |
(...skipping 14 matching lines...) Expand all Loading... |
39 | 46 |
40 // If a derived class overrides this method, it should call parent's | 47 // If a derived class overrides this method, it should call parent's |
41 // implementation first, to make sure |widget_focused_| flag can be updated | 48 // implementation first, to make sure |widget_focused_| flag can be updated |
42 // correctly. | 49 // correctly. |
43 virtual void OnBlur() OVERRIDE; | 50 virtual void OnBlur() OVERRIDE; |
44 | 51 |
45 // If a derived class overrides this method, it should call parent's | 52 // If a derived class overrides this method, it should call parent's |
46 // implementation. | 53 // implementation. |
47 virtual void OnTextInputTypeChanged(View* view) OVERRIDE; | 54 virtual void OnTextInputTypeChanged(View* view) OVERRIDE; |
48 | 55 |
49 virtual TextInputClient* GetTextInputClient() const OVERRIDE; | 56 virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE; |
50 virtual ui::TextInputType GetTextInputType() const OVERRIDE; | 57 virtual ui::TextInputType GetTextInputType() const OVERRIDE; |
51 virtual bool IsMock() const OVERRIDE; | 58 virtual bool IsMock() const OVERRIDE; |
52 | 59 |
53 // Overridden from FocusChangeListener. Derived classes shouldn't override | 60 // Overridden from FocusChangeListener. Derived classes shouldn't override |
54 // this method. Override FocusedViewWillChange() and FocusedViewDidChange() | 61 // this method. Override FocusedViewWillChange() and FocusedViewDidChange() |
55 // instead. | 62 // instead. |
56 virtual void FocusWillChange(View* focused_before, View* focused) OVERRIDE; | 63 virtual void FocusWillChange(View* focused_before, View* focused) OVERRIDE; |
57 | 64 |
58 protected: | 65 protected: |
59 // Getters and setters of properties. | 66 // Getters and setters of properties. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 109 |
103 // Indicates if the top-level widget is focused or not. | 110 // Indicates if the top-level widget is focused or not. |
104 bool widget_focused_; | 111 bool widget_focused_; |
105 | 112 |
106 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); | 113 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); |
107 }; | 114 }; |
108 | 115 |
109 } // namespace views | 116 } // namespace views |
110 | 117 |
111 #endif // VIEWS_IME_INPUT_METHOD_BASE_H_ | 118 #endif // VIEWS_IME_INPUT_METHOD_BASE_H_ |
OLD | NEW |