| 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 #ifndef UI_BASE_IME_INPUT_METHOD_BASE_H_ | 5 #ifndef UI_BASE_IME_INPUT_METHOD_BASE_H_ |
| 6 #define UI_BASE_IME_INPUT_METHOD_BASE_H_ | 6 #define UI_BASE_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 "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 #include "ui/base/ime/input_method.h" | 12 #include "ui/base/ime/input_method.h" |
| 13 #include "ui/base/ime/ui_base_ime_export.h" | 13 #include "ui/base/ui_base_export.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Rect; | 16 class Rect; |
| 17 } // namespace gfx | 17 } // namespace gfx |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 | 20 |
| 21 class InputMethodObserver; | 21 class InputMethodObserver; |
| 22 class KeyEvent; | 22 class KeyEvent; |
| 23 class TextInputClient; | 23 class TextInputClient; |
| 24 | 24 |
| 25 // A helper class providing functionalities shared among ui::InputMethod | 25 // A helper class providing functionalities shared among ui::InputMethod |
| 26 // implementations. | 26 // implementations. |
| 27 class UI_BASE_IME_EXPORT InputMethodBase | 27 class UI_BASE_EXPORT InputMethodBase |
| 28 : NON_EXPORTED_BASE(public InputMethod), | 28 : NON_EXPORTED_BASE(public InputMethod), |
| 29 public base::SupportsWeakPtr<InputMethodBase> { | 29 public base::SupportsWeakPtr<InputMethodBase> { |
| 30 public: | 30 public: |
| 31 InputMethodBase(); | 31 InputMethodBase(); |
| 32 ~InputMethodBase() override; | 32 ~InputMethodBase() override; |
| 33 | 33 |
| 34 // Overriden from InputMethod. | 34 // Overriden from InputMethod. |
| 35 void SetDelegate(internal::InputMethodDelegate* delegate) override; | 35 void SetDelegate(internal::InputMethodDelegate* delegate) override; |
| 36 void Init(bool focused) override; | 36 void Init(bool focused) override; |
| 37 // If a derived class overrides OnFocus()/OnBlur(), it should call parent's | 37 // If a derived class overrides OnFocus()/OnBlur(), it should call parent's |
| 38 // implementation first, to make sure |system_toplevel_window_focused_| flag | 38 // implementation first, to make sure |system_toplevel_window_focused_| flag |
| 39 // can be updated correctly. | 39 // can be updated correctly. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 ObserverList<InputMethodObserver> observer_list_; | 113 ObserverList<InputMethodObserver> observer_list_; |
| 114 | 114 |
| 115 bool system_toplevel_window_focused_; | 115 bool system_toplevel_window_focused_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); | 117 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace ui | 120 } // namespace ui |
| 121 | 121 |
| 122 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ | 122 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ |
| OLD | NEW |