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 UI_VIEWS_IME_INPUT_METHOD_BASE_H_ | 5 #ifndef UI_VIEWS_IME_INPUT_METHOD_BASE_H_ |
6 #define UI_VIEWS_IME_INPUT_METHOD_BASE_H_ | 6 #define UI_VIEWS_IME_INPUT_METHOD_BASE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/views/focus/focus_manager.h" | 10 #include "ui/views/focus/focus_manager.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 virtual void OnTextInputTypeChanged(View* view) OVERRIDE; | 34 virtual void OnTextInputTypeChanged(View* view) OVERRIDE; |
35 virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE; | 35 virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE; |
36 virtual ui::TextInputType GetTextInputType() const OVERRIDE; | 36 virtual ui::TextInputType GetTextInputType() const OVERRIDE; |
37 virtual bool IsMock() const OVERRIDE; | 37 virtual bool IsMock() const OVERRIDE; |
38 | 38 |
39 // Overridden from FocusChangeListener. | 39 // Overridden from FocusChangeListener. |
40 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; | 40 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; |
41 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; | 41 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; |
42 | 42 |
43 protected: | 43 protected: |
44 // Return the widget's focused view. | 44 internal::InputMethodDelegate* delegate() const { return delegate_; } |
| 45 Widget* widget() const { return widget_; } |
45 View* GetFocusedView() const; | 46 View* GetFocusedView() const; |
46 | 47 |
47 // Returns true only if the View is focused and its Widget is active. | 48 // Returns true only if the View is focused and its Widget is active. |
48 bool IsViewFocused(View* view) const; | 49 bool IsViewFocused(View* view) const; |
49 | 50 |
50 // Returns true if there is no focused text input client or its type is none. | 51 // Returns true if there is no focused text input client or its type is none. |
51 bool IsTextInputTypeNone() const; | 52 bool IsTextInputTypeNone() const; |
52 | 53 |
53 // Calls the focused text input client's OnInputMethodChanged() method. | 54 // Calls the focused text input client's OnInputMethodChanged() method. |
54 // This has no effect if the text input type is ui::TEXT_INPUT_TYPE_NONE. | 55 // This has no effect if the text input type is ui::TEXT_INPUT_TYPE_NONE. |
(...skipping 14 matching lines...) Expand all Loading... |
69 private: | 70 private: |
70 internal::InputMethodDelegate* delegate_; | 71 internal::InputMethodDelegate* delegate_; |
71 Widget* widget_; | 72 Widget* widget_; |
72 | 73 |
73 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); | 74 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); |
74 }; | 75 }; |
75 | 76 |
76 } // namespace views | 77 } // namespace views |
77 | 78 |
78 #endif // UI_VIEWS_IME_INPUT_METHOD_BASE_H_ | 79 #endif // UI_VIEWS_IME_INPUT_METHOD_BASE_H_ |
OLD | NEW |