| 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 "components/arc/arc_service.h" |
| 9 #include "components/arc/ime/arc_ime_ipc_host.h" | 10 #include "components/arc/ime/arc_ime_ipc_host.h" |
| 10 #include "ui/aura/client/focus_change_observer.h" | 11 #include "ui/aura/client/focus_change_observer.h" |
| 11 #include "ui/aura/env_observer.h" | 12 #include "ui/aura/env_observer.h" |
| 12 #include "ui/aura/window_observer.h" | 13 #include "ui/aura/window_observer.h" |
| 13 #include "ui/aura/window_tracker.h" | 14 #include "ui/aura/window_tracker.h" |
| 14 #include "ui/base/ime/text_input_client.h" | 15 #include "ui/base/ime/text_input_client.h" |
| 15 #include "ui/base/ime/text_input_flags.h" | 16 #include "ui/base/ime/text_input_flags.h" |
| 16 #include "ui/base/ime/text_input_type.h" | 17 #include "ui/base/ime/text_input_type.h" |
| 17 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
| 18 | 19 |
| 19 namespace aura { | 20 namespace aura { |
| 20 class Window; | 21 class Window; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace ui { | 24 namespace ui { |
| 24 class InputMethod; | 25 class InputMethod; |
| 25 } | 26 } |
| 26 | 27 |
| 27 namespace arc { | 28 namespace arc { |
| 28 | 29 |
| 29 class ArcBridgeService; | 30 class ArcBridgeService; |
| 30 | 31 |
| 31 // This class implements ui::TextInputClient and makes ARC windows behave | 32 // This class implements ui::TextInputClient and makes ARC windows behave |
| 32 // as a text input target in Chrome OS environment. | 33 // as a text input target in Chrome OS environment. |
| 33 class ArcImeBridge : public ArcImeIpcHost::Delegate, | 34 class ArcImeBridge : public ArcService, |
| 35 public ArcImeIpcHost::Delegate, |
| 34 public aura::EnvObserver, | 36 public aura::EnvObserver, |
| 35 public aura::WindowObserver, | 37 public aura::WindowObserver, |
| 36 public aura::client::FocusChangeObserver, | 38 public aura::client::FocusChangeObserver, |
| 37 public ui::TextInputClient { | 39 public ui::TextInputClient { |
| 38 public: | 40 public: |
| 39 explicit ArcImeBridge(ArcBridgeService* arc_bridge_service); | 41 explicit ArcImeBridge(ArcBridgeService* arc_bridge_service); |
| 40 ~ArcImeBridge() override; | 42 ~ArcImeBridge() override; |
| 41 | 43 |
| 42 // Overridden from aura::EnvObserver: | 44 // Overridden from aura::EnvObserver: |
| 43 void OnWindowInitialized(aura::Window* new_window) override; | 45 void OnWindowInitialized(aura::Window* new_window) override; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 aura::WindowTracker observing_root_windows_; | 98 aura::WindowTracker observing_root_windows_; |
| 97 aura::WindowTracker arc_windows_; | 99 aura::WindowTracker arc_windows_; |
| 98 aura::WindowTracker focused_arc_window_; | 100 aura::WindowTracker focused_arc_window_; |
| 99 | 101 |
| 100 DISALLOW_COPY_AND_ASSIGN(ArcImeBridge); | 102 DISALLOW_COPY_AND_ASSIGN(ArcImeBridge); |
| 101 }; | 103 }; |
| 102 | 104 |
| 103 } // namespace arc | 105 } // namespace arc |
| 104 | 106 |
| 105 #endif // COMPONENTS_ARC_IME_ARC_IME_BRIDGE_H_ | 107 #endif // COMPONENTS_ARC_IME_ARC_IME_BRIDGE_H_ |
| OLD | NEW |