Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Side by Side Diff: components/arc/ime/arc_ime_bridge.cc

Issue 1596663002: arc-bridge: Introduce the ArcService class (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Moved race avoidance boilerplate to ArcBridgeService Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "ui/aura/client/focus_client.h" 8 #include "ui/aura/client/focus_client.h"
9 #include "ui/aura/env.h" 9 #include "ui/aura/env.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 12 matching lines...) Expand all
23 // stabilized. 23 // stabilized.
24 bool IsArcWindow(const aura::Window* window) { 24 bool IsArcWindow(const aura::Window* window) {
25 return window->name() == "ExoSurface"; 25 return window->name() == "ExoSurface";
26 } 26 }
27 27
28 } // namespace 28 } // namespace
29 29
30 //////////////////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////////////////
31 // ArcImeBridge main implementation: 31 // ArcImeBridge main implementation:
32 32
33 ArcImeBridge::ArcImeBridge(ArcBridgeService* arc_bridge_service) 33 ArcImeBridge::ArcImeBridge(ArcBridgeService* bridge_service)
34 : ipc_host_(this, arc_bridge_service), 34 : ArcService(bridge_service),
35 ipc_host_(this, bridge_service),
35 ime_type_(ui::TEXT_INPUT_TYPE_NONE) { 36 ime_type_(ui::TEXT_INPUT_TYPE_NONE) {
36 aura::Env* env = aura::Env::GetInstanceDontCreate(); 37 aura::Env* env = aura::Env::GetInstanceDontCreate();
37 if (env) 38 if (env)
38 env->AddObserver(this); 39 env->AddObserver(this);
39 } 40 }
40 41
41 ArcImeBridge::~ArcImeBridge() { 42 ArcImeBridge::~ArcImeBridge() {
42 ui::InputMethod* const input_method = GetInputMethod(); 43 ui::InputMethod* const input_method = GetInputMethod();
43 if (input_method) 44 if (input_method)
44 input_method->DetachTextInputClient(this); 45 input_method->DetachTextInputClient(this);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool ArcImeBridge::ChangeTextDirectionAndLayoutAlignment( 210 bool ArcImeBridge::ChangeTextDirectionAndLayoutAlignment(
210 base::i18n::TextDirection direction) { 211 base::i18n::TextDirection direction) {
211 return false; 212 return false;
212 } 213 }
213 214
214 bool ArcImeBridge::IsEditCommandEnabled(int command_id) { 215 bool ArcImeBridge::IsEditCommandEnabled(int command_id) {
215 return false; 216 return false;
216 } 217 }
217 218
218 } // namespace arc 219 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698