| 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" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // input type is not TEXT_INPUT_TYPE_NONE. | 74 // input type is not TEXT_INPUT_TYPE_NONE. |
| 75 void OnInputMethodChanged() const; | 75 void OnInputMethodChanged() const; |
| 76 | 76 |
| 77 // Convenience method to call delegate_->DispatchKeyEventPostIME(). | 77 // Convenience method to call delegate_->DispatchKeyEventPostIME(). |
| 78 // Returns true if the event was processed | 78 // Returns true if the event was processed |
| 79 bool DispatchKeyEventPostIME(const ui::KeyEvent& event) const; | 79 bool DispatchKeyEventPostIME(const ui::KeyEvent& event) const; |
| 80 | 80 |
| 81 // Convenience method to notify all observers of TextInputClient changes. | 81 // Convenience method to notify all observers of TextInputClient changes. |
| 82 void NotifyTextInputStateChanged(const TextInputClient* client); | 82 void NotifyTextInputStateChanged(const TextInputClient* client); |
| 83 | 83 |
| 84 // Convenience method to notify all observers of CaretBounds changes on |
| 85 // |client| which is the text input client with focus. |
| 86 void NotifyTextInputCaretBoundsChanged(const TextInputClient* client); |
| 87 |
| 84 // Interface for for signalling candidate window events. | 88 // Interface for for signalling candidate window events. |
| 85 // See also *Callback functions below. To avoid reentrancy issue that | 89 // See also *Callback functions below. To avoid reentrancy issue that |
| 86 // TextInputClient manipulates IME state during even handling, these methods | 90 // TextInputClient manipulates IME state during even handling, these methods |
| 87 // defer sending actual signals to renderer. | 91 // defer sending actual signals to renderer. |
| 88 void OnCandidateWindowShown(); | 92 void OnCandidateWindowShown(); |
| 89 void OnCandidateWindowUpdated(); | 93 void OnCandidateWindowUpdated(); |
| 90 void OnCandidateWindowHidden(); | 94 void OnCandidateWindowHidden(); |
| 91 | 95 |
| 92 bool system_toplevel_window_focused() const { | 96 bool system_toplevel_window_focused() const { |
| 93 return system_toplevel_window_focused_; | 97 return system_toplevel_window_focused_; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 108 ObserverList<InputMethodObserver> observer_list_; | 112 ObserverList<InputMethodObserver> observer_list_; |
| 109 | 113 |
| 110 bool system_toplevel_window_focused_; | 114 bool system_toplevel_window_focused_; |
| 111 | 115 |
| 112 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); | 116 DISALLOW_COPY_AND_ASSIGN(InputMethodBase); |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 } // namespace ui | 119 } // namespace ui |
| 116 | 120 |
| 117 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ | 121 #endif // UI_BASE_IME_INPUT_METHOD_BASE_H_ |
| OLD | NEW |