| 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_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ | 5 #ifndef UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ |
| 6 #define UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ | 6 #define UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 virtual bool GetTextFromRange(const gfx::Range& range, | 72 virtual bool GetTextFromRange(const gfx::Range& range, |
| 73 base::string16* text) const OVERRIDE; | 73 base::string16* text) const OVERRIDE; |
| 74 virtual void OnInputMethodChanged() OVERRIDE; | 74 virtual void OnInputMethodChanged() OVERRIDE; |
| 75 virtual bool ChangeTextDirectionAndLayoutAlignment( | 75 virtual bool ChangeTextDirectionAndLayoutAlignment( |
| 76 base::i18n::TextDirection direction) OVERRIDE; | 76 base::i18n::TextDirection direction) OVERRIDE; |
| 77 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; | 77 virtual void ExtendSelectionAndDelete(size_t before, size_t after) OVERRIDE; |
| 78 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE; | 78 virtual void EnsureCaretInRect(const gfx::Rect& rect) OVERRIDE; |
| 79 virtual void OnCandidateWindowShown() OVERRIDE; | 79 virtual void OnCandidateWindowShown() OVERRIDE; |
| 80 virtual void OnCandidateWindowUpdated() OVERRIDE; | 80 virtual void OnCandidateWindowUpdated() OVERRIDE; |
| 81 virtual void OnCandidateWindowHidden() OVERRIDE; | 81 virtual void OnCandidateWindowHidden() OVERRIDE; |
| 82 virtual bool IsEditingCommandEnabled(int command_id) OVERRIDE; |
| 83 virtual void ExecuteEditingCommand(int command_id) OVERRIDE; |
| 82 | 84 |
| 83 // Overridden from FocusChangeListener. | 85 // Overridden from FocusChangeListener. |
| 84 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; | 86 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; |
| 85 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; | 87 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; |
| 86 | 88 |
| 87 ui::InputMethod* GetHostInputMethod() const; | 89 ui::InputMethod* GetHostInputMethod() const; |
| 88 | 90 |
| 89 private: | 91 private: |
| 90 class HostObserver; | 92 class HostObserver; |
| 91 | 93 |
| 92 void UpdateViewFocusState(); | 94 void UpdateViewFocusState(); |
| 93 | 95 |
| 94 ui::InputMethod* host_; | 96 ui::InputMethod* host_; |
| 95 | 97 |
| 96 // An observer observing the host input method for cases that the host input | 98 // An observer observing the host input method for cases that the host input |
| 97 // method is destroyed before this bridge input method. | 99 // method is destroyed before this bridge input method. |
| 98 scoped_ptr<HostObserver> host_observer_; | 100 scoped_ptr<HostObserver> host_observer_; |
| 99 | 101 |
| 100 const bool shared_input_method_; | 102 const bool shared_input_method_; |
| 101 | 103 |
| 102 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge); | 104 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge); |
| 103 }; | 105 }; |
| 104 | 106 |
| 105 } // namespace views | 107 } // namespace views |
| 106 | 108 |
| 107 #endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ | 109 #endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ |
| OLD | NEW |