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 #include "components/arc/ime/arc_ime_bridge.h" | 5 #include "components/arc/ime/arc_ime_bridge.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "components/arc/ime/arc_ime_ipc_host_impl.h" | 8 #include "components/arc/ime/arc_ime_ipc_host_impl.h" |
9 #include "ui/aura/client/focus_client.h" | 9 #include "ui/aura/client/focus_client.h" |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // stabilized. | 24 // stabilized. |
25 bool IsArcWindow(const aura::Window* window) { | 25 bool IsArcWindow(const aura::Window* window) { |
26 return window->name() == "ExoSurface"; | 26 return window->name() == "ExoSurface"; |
27 } | 27 } |
28 | 28 |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 //////////////////////////////////////////////////////////////////////////////// | 31 //////////////////////////////////////////////////////////////////////////////// |
32 // ArcImeBridge main implementation: | 32 // ArcImeBridge main implementation: |
33 | 33 |
34 ArcImeBridge::ArcImeBridge(ArcBridgeService* arc_bridge_service) | 34 ArcImeBridge::ArcImeBridge(ArcBridgeService* bridge_service) |
35 : ipc_host_(new ArcImeIpcHostImpl(this, arc_bridge_service)), | 35 : ArcService(bridge_service), |
| 36 ipc_host_(new ArcImeIpcHostImpl(this, bridge_service)), |
36 ime_type_(ui::TEXT_INPUT_TYPE_NONE), | 37 ime_type_(ui::TEXT_INPUT_TYPE_NONE), |
37 has_composition_text_(false) { | 38 has_composition_text_(false) { |
38 aura::Env* env = aura::Env::GetInstanceDontCreate(); | 39 aura::Env* env = aura::Env::GetInstanceDontCreate(); |
39 if (env) | 40 if (env) |
40 env->AddObserver(this); | 41 env->AddObserver(this); |
41 } | 42 } |
42 | 43 |
43 ArcImeBridge::~ArcImeBridge() { | 44 ArcImeBridge::~ArcImeBridge() { |
44 ui::InputMethod* const input_method = GetInputMethod(); | 45 ui::InputMethod* const input_method = GetInputMethod(); |
45 if (input_method) | 46 if (input_method) |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 bool ArcImeBridge::ChangeTextDirectionAndLayoutAlignment( | 225 bool ArcImeBridge::ChangeTextDirectionAndLayoutAlignment( |
225 base::i18n::TextDirection direction) { | 226 base::i18n::TextDirection direction) { |
226 return false; | 227 return false; |
227 } | 228 } |
228 | 229 |
229 bool ArcImeBridge::IsEditCommandEnabled(int command_id) { | 230 bool ArcImeBridge::IsEditCommandEnabled(int command_id) { |
230 return false; | 231 return false; |
231 } | 232 } |
232 | 233 |
233 } // namespace arc | 234 } // namespace arc |
OLD | NEW |