| 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 11 matching lines...) Expand all Loading... |
| 22 namespace views { | 22 namespace views { |
| 23 | 23 |
| 24 // A helper that provides functionality shared by InputMethod implementations. | 24 // A helper that provides functionality shared by InputMethod implementations. |
| 25 class VIEWS_EXPORT InputMethodBase : public InputMethod, | 25 class VIEWS_EXPORT InputMethodBase : public InputMethod, |
| 26 public FocusChangeListener { | 26 public FocusChangeListener { |
| 27 public: | 27 public: |
| 28 InputMethodBase(); | 28 InputMethodBase(); |
| 29 virtual ~InputMethodBase(); | 29 virtual ~InputMethodBase(); |
| 30 | 30 |
| 31 // Overridden from InputMethod. | 31 // Overridden from InputMethod. |
| 32 virtual void SetDelegate(internal::InputMethodDelegate* delegate) OVERRIDE; | 32 virtual void SetDelegate(internal::InputMethodDelegate* delegate) override; |
| 33 virtual void Init(Widget* widget) OVERRIDE; | 33 virtual void Init(Widget* widget) override; |
| 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 internal::InputMethodDelegate* delegate() const { return delegate_; } | 44 internal::InputMethodDelegate* delegate() const { return delegate_; } |
| 45 Widget* widget() const { return widget_; } | 45 Widget* widget() const { return widget_; } |
| 46 View* GetFocusedView() const; | 46 View* GetFocusedView() const; |
| 47 | 47 |
| 48 // 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. |
| 49 bool IsViewFocused(View* view) const; | 49 bool IsViewFocused(View* view) const; |
| 50 | 50 |
| 51 // 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. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 private: | 70 private: |
| 71 internal::InputMethodDelegate* delegate_; | 71 internal::InputMethodDelegate* delegate_; |
| 72 Widget* widget_; | 72 Widget* widget_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); | 74 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 } // namespace views | 77 } // namespace views |
| 78 | 78 |
| 79 #endif // UI_VIEWS_IME_INPUT_METHOD_BASE_H_ | 79 #endif // UI_VIEWS_IME_INPUT_METHOD_BASE_H_ |
| OLD | NEW |