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

Side by Side Diff: ash/common/shelf/shelf_layout_manager.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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ 5 #ifndef ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_
6 #define ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ 6 #define ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/common/session/session_state_observer.h" 11 #include "ash/common/session/session_state_observer.h"
12 #include "ash/common/shelf/wm_shelf.h" 12 #include "ash/common/shelf/wm_shelf.h"
13 #include "ash/common/shell_observer.h" 13 #include "ash/common/shell_observer.h"
14 #include "ash/common/wm/dock/docked_window_layout_manager_observer.h" 14 #include "ash/common/wm/dock/docked_window_layout_manager_observer.h"
15 #include "ash/common/wm/lock_state_observer.h" 15 #include "ash/common/wm/lock_state_observer.h"
16 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h" 16 #include "ash/common/wm/wm_snap_to_pixel_layout_manager.h"
17 #include "ash/common/wm/workspace/workspace_types.h" 17 #include "ash/common/wm/workspace/workspace_types.h"
18 #include "ash/public/cpp/shelf_types.h" 18 #include "ash/public/cpp/shelf_types.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/observer_list.h" 20 #include "base/observer_list.h"
21 #include "base/scoped_observer.h"
21 #include "base/timer/timer.h" 22 #include "base/timer/timer.h"
22 #include "ui/gfx/geometry/insets.h" 23 #include "ui/gfx/geometry/insets.h"
23 #include "ui/gfx/geometry/rect.h" 24 #include "ui/gfx/geometry/rect.h"
24 #include "ui/keyboard/keyboard_controller_observer.h" 25 #include "ui/keyboard/keyboard_controller_observer.h"
25 #include "ui/wm/public/activation_change_observer.h" 26 #include "ui/wm/public/activation_change_observer.h"
26 27
28 namespace keyboard {
29 class KeyboardController;
30 }
31
27 namespace ui { 32 namespace ui {
28 class ImplicitAnimationObserver; 33 class ImplicitAnimationObserver;
29 class MouseEvent; 34 class MouseEvent;
30 } 35 }
31 36
32 namespace ash { 37 namespace ash {
33 38
34 enum class AnimationChangeType; 39 enum class AnimationChangeType;
35 class PanelLayoutManagerTest; 40 class PanelLayoutManagerTest;
36 class ShelfLayoutManagerObserver; 41 class ShelfLayoutManagerObserver;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 void SetAnimationDurationOverride(int duration_override_in_ms); 133 void SetAnimationDurationOverride(int duration_override_in_ms);
129 134
130 // Overridden from wm::WmSnapToPixelLayoutManager: 135 // Overridden from wm::WmSnapToPixelLayoutManager:
131 void OnWindowResized() override; 136 void OnWindowResized() override;
132 void SetChildBounds(WmWindow* child, 137 void SetChildBounds(WmWindow* child,
133 const gfx::Rect& requested_bounds) override; 138 const gfx::Rect& requested_bounds) override;
134 139
135 // Overridden from ShellObserver: 140 // Overridden from ShellObserver:
136 void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) override; 141 void OnShelfAutoHideBehaviorChanged(WmWindow* root_window) override;
137 void OnPinnedStateChanged(WmWindow* pinned_window) override; 142 void OnPinnedStateChanged(WmWindow* pinned_window) override;
143 void OnVirtualKeyboardStateChanged(bool activated,
144 WmWindow* root_window) override;
138 145
139 // Overridden from aura::client::ActivationChangeObserver: 146 // Overridden from aura::client::ActivationChangeObserver:
140 void OnWindowActivated(ActivationReason reason, 147 void OnWindowActivated(ActivationReason reason,
141 aura::Window* gained_active, 148 aura::Window* gained_active,
142 aura::Window* lost_active) override; 149 aura::Window* lost_active) override;
143 150
144 // Overridden from keyboard::KeyboardControllerObserver: 151 // Overridden from keyboard::KeyboardControllerObserver:
145 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override; 152 void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) override;
146 void OnKeyboardClosed() override; 153 void OnKeyboardClosed() override;
147 154
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // needs to be removed from the available work area. 358 // needs to be removed from the available work area.
352 int chromevox_panel_height_; 359 int chromevox_panel_height_;
353 360
354 // The show hide animation duration override or 0 for default. 361 // The show hide animation duration override or 0 for default.
355 int duration_override_in_ms_; 362 int duration_override_in_ms_;
356 363
357 // The current shelf background. Should not be assigned to directly, use 364 // The current shelf background. Should not be assigned to directly, use
358 // MaybeUpdateShelfBackground() instead. 365 // MaybeUpdateShelfBackground() instead.
359 ShelfBackgroundType shelf_background_type_; 366 ShelfBackgroundType shelf_background_type_;
360 367
368 ScopedObserver<keyboard::KeyboardController,
369 keyboard::KeyboardControllerObserver>
370 keyboard_observer_;
371
361 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 372 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
362 }; 373 };
363 374
364 } // namespace ash 375 } // namespace ash
365 376
366 #endif // ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ 377 #endif // ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ash/common/keyboard/keyboard_observer_register.cc ('k') | ash/common/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698