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

Side by Side Diff: ash/common/keyboard/keyboard_observer_register.h

Issue 2747543002: ash: Start/stop observing KeyboardController via ShellObserver (Closed)
Patch Set: update LockLayoutManager to use similar logic Created 3 years, 9 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
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/keyboard/keyboard_observer_register.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_KEYBOARD_KEYBOAD_OBSERVER_REGISTER_H_
6 #define ASH_COMMON_KEYBOARD_KEYBOAD_OBSERVER_REGISTER_H_
7
8 #include "base/scoped_observer.h"
9
10 namespace keyboard {
11 class KeyboardController;
12 class KeyboardControllerObserver;
13 }
14
15 namespace ash {
16
17 class WmWindow;
18
19 // Helper function to start/stop observing KeyboardController.
20 // |keyboard_root_window| is the root window where KeyboardController changes
21 // states. |observer_root_window| is the root window relevant to the
22 // |keyboard_observer|. If |keyboard_root_window| is different from
23 // |observer_root_window|, this function is a no-op. Otherwise, the observing
24 // starts if |keyboard_activated| is true and stops if |keyboard_activated| is
25 // false.
26 void UpdateKeyboardObserverFromStateChanged(
27 bool keyboard_activated,
28 WmWindow* keyboard_root_window,
29 WmWindow* observer_root_window,
30 ScopedObserver<keyboard::KeyboardController,
31 keyboard::KeyboardControllerObserver>* keyboard_observer);
32
33 } // namespace ash
34
35 #endif // ASH_COMMON_KEYBOARD_KEYBOAD_OBSERVER_REGISTER_H_
OLDNEW
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/keyboard/keyboard_observer_register.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698