OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 COMPONENTS_ARC_IME_ARC_IME_BRIDGE_H_ | 5 #ifndef COMPONENTS_ARC_IME_ARC_IME_BRIDGE_H_ |
6 #define COMPONENTS_ARC_IME_ARC_IME_BRIDGE_H_ | 6 #define COMPONENTS_ARC_IME_ARC_IME_BRIDGE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "components/arc/arc_service.h" | 10 #include "components/arc/arc_service.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 public aura::WindowObserver, | 38 public aura::WindowObserver, |
39 public aura::client::FocusChangeObserver, | 39 public aura::client::FocusChangeObserver, |
40 public ui::TextInputClient { | 40 public ui::TextInputClient { |
41 public: | 41 public: |
42 explicit ArcImeBridge(ArcBridgeService* bridge_service); | 42 explicit ArcImeBridge(ArcBridgeService* bridge_service); |
43 ~ArcImeBridge() override; | 43 ~ArcImeBridge() override; |
44 | 44 |
45 // Injects the custom IPC host object for testing purpose only. | 45 // Injects the custom IPC host object for testing purpose only. |
46 void SetIpcHostForTesting(scoped_ptr<ArcImeIpcHost> test_ipc_host); | 46 void SetIpcHostForTesting(scoped_ptr<ArcImeIpcHost> test_ipc_host); |
47 | 47 |
| 48 // Injects the custom IME for testing purpose only. |
| 49 void SetInputMethodForTesting(ui::InputMethod* test_input_method); |
| 50 |
48 // Overridden from aura::EnvObserver: | 51 // Overridden from aura::EnvObserver: |
49 void OnWindowInitialized(aura::Window* new_window) override; | 52 void OnWindowInitialized(aura::Window* new_window) override; |
50 | 53 |
51 // Overridden from aura::WindowObserver: | 54 // Overridden from aura::WindowObserver: |
52 void OnWindowAddedToRootWindow(aura::Window* window) override; | 55 void OnWindowAddedToRootWindow(aura::Window* window) override; |
53 | 56 |
54 // Overridden from aura::client::FocusChangeObserver: | 57 // Overridden from aura::client::FocusChangeObserver: |
55 void OnWindowFocused(aura::Window* gained_focus, | 58 void OnWindowFocused(aura::Window* gained_focus, |
56 aura::Window* lost_focus) override; | 59 aura::Window* lost_focus) override; |
57 | 60 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 100 |
98 scoped_ptr<ArcImeIpcHost> ipc_host_; | 101 scoped_ptr<ArcImeIpcHost> ipc_host_; |
99 ui::TextInputType ime_type_; | 102 ui::TextInputType ime_type_; |
100 gfx::Rect cursor_rect_; | 103 gfx::Rect cursor_rect_; |
101 bool has_composition_text_; | 104 bool has_composition_text_; |
102 | 105 |
103 aura::WindowTracker observing_root_windows_; | 106 aura::WindowTracker observing_root_windows_; |
104 aura::WindowTracker arc_windows_; | 107 aura::WindowTracker arc_windows_; |
105 aura::WindowTracker focused_arc_window_; | 108 aura::WindowTracker focused_arc_window_; |
106 | 109 |
| 110 ui::InputMethod* test_input_method_; |
| 111 |
107 DISALLOW_COPY_AND_ASSIGN(ArcImeBridge); | 112 DISALLOW_COPY_AND_ASSIGN(ArcImeBridge); |
108 }; | 113 }; |
109 | 114 |
110 } // namespace arc | 115 } // namespace arc |
111 | 116 |
112 #endif // COMPONENTS_ARC_IME_ARC_IME_BRIDGE_H_ | 117 #endif // COMPONENTS_ARC_IME_ARC_IME_BRIDGE_H_ |
OLD | NEW |