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