| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 79 |
| 80 // Overridden from FocusChangeListener. | 80 // Overridden from FocusChangeListener. |
| 81 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; | 81 virtual void OnWillChangeFocus(View* focused_before, View* focused) OVERRIDE; |
| 82 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; | 82 virtual void OnDidChangeFocus(View* focused_before, View* focused) OVERRIDE; |
| 83 | 83 |
| 84 ui::InputMethod* GetHostInputMethod() const; | 84 ui::InputMethod* GetHostInputMethod() const; |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 class HostObserver; |
| 88 |
| 87 void UpdateViewFocusState(); | 89 void UpdateViewFocusState(); |
| 88 | 90 |
| 89 ui::InputMethod* const host_; | 91 ui::InputMethod* host_; |
| 92 |
| 93 // An observer observing the host input method for cases that the host input |
| 94 // method is destroyed before this bridge input method. |
| 95 scoped_ptr<HostObserver> host_observer_; |
| 90 | 96 |
| 91 const bool shared_input_method_; | 97 const bool shared_input_method_; |
| 92 | 98 |
| 93 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge); | 99 DISALLOW_COPY_AND_ASSIGN(InputMethodBridge); |
| 94 }; | 100 }; |
| 95 | 101 |
| 96 } // namespace views | 102 } // namespace views |
| 97 | 103 |
| 98 #endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ | 104 #endif // UI_VIEWS_IME_INPUT_METHOD_BRIDGE_H_ |
| OLD | NEW |