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

Side by Side Diff: ash/sysui/keyboard_ui_mus.cc

Issue 2118593002: mash: Migrate ShellDelegate ownership and access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 5 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 "ash/sysui/keyboard_ui_mus.h" 5 #include "ash/sysui/keyboard_ui_mus.h"
6 6
7 #include "ash/common/keyboard/keyboard_ui_observer.h" 7 #include "ash/common/keyboard/keyboard_ui_observer.h"
8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h"
10 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
11 #include "services/shell/public/cpp/connector.h" 9 #include "services/shell/public/cpp/connector.h"
12 10
13 namespace ash { 11 namespace ash {
14 12
15 KeyboardUIMus::KeyboardUIMus(::shell::Connector* connector) 13 KeyboardUIMus::KeyboardUIMus(::shell::Connector* connector)
16 : is_enabled_(false), observer_binding_(this) { 14 : is_enabled_(false), observer_binding_(this) {
17 // TODO(sky): should be something like mojo:keyboard, but need mapping. 15 // TODO(sky): should be something like mojo:keyboard, but need mapping.
18 connector->ConnectToInterface("exe:chrome", &keyboard_); 16 connector->ConnectToInterface("exe:chrome", &keyboard_);
19 keyboard_->AddObserver(observer_binding_.CreateInterfacePtrAndBind()); 17 keyboard_->AddObserver(observer_binding_.CreateInterfacePtrAndBind());
(...skipping 25 matching lines...) Expand all
45 const gfx::Rect& bounds) { 43 const gfx::Rect& bounds) {
46 if (is_enabled_ == is_enabled) 44 if (is_enabled_ == is_enabled)
47 return; 45 return;
48 46
49 is_enabled_ = is_enabled; 47 is_enabled_ = is_enabled;
50 FOR_EACH_OBSERVER(KeyboardUIObserver, *observers(), 48 FOR_EACH_OBSERVER(KeyboardUIObserver, *observers(),
51 OnKeyboardEnabledStateChanged(is_enabled)); 49 OnKeyboardEnabledStateChanged(is_enabled));
52 } 50 }
53 51
54 } // namespace ash 52 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698