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

Side by Side Diff: ash/common/shelf/shelf_layout_manager.h

Issue 2747543002: ash: Start/stop observing KeyboardController via ShellObserver (Closed)
Patch Set: rebase 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 | « no previous file | ash/common/shelf/shelf_layout_manager.cc » ('j') | ash/root_window_controller.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 return wm_shelf_->IsHorizontalAlignment() ? horizontal : vertical; 178 return wm_shelf_->IsHorizontalAlignment() ? horizontal : vertical;
174 } 179 }
175 180
176 // Returns how the shelf background should be painted. 181 // Returns how the shelf background should be painted.
177 ShelfBackgroundType GetShelfBackgroundType() const; 182 ShelfBackgroundType GetShelfBackgroundType() const;
178 183
179 // Set the height of the ChromeVox panel, which takes away space from the 184 // Set the height of the ChromeVox panel, which takes away space from the
180 // available work area from the top of the screen. 185 // available work area from the top of the screen.
181 void SetChromeVoxPanelHeight(int height); 186 void SetChromeVoxPanelHeight(int height);
182 187
188 void StartObservingKeyboard(
189 keyboard::KeyboardController* keyboard_controller);
190 void StopObservingKeyboard(keyboard::KeyboardController* keyboard_controller);
191
183 private: 192 private:
184 class UpdateShelfObserver; 193 class UpdateShelfObserver;
185 friend class PanelLayoutManagerTest; 194 friend class PanelLayoutManagerTest;
186 friend class ShelfLayoutManagerTest; 195 friend class ShelfLayoutManagerTest;
187 friend class WebNotificationTrayTest; 196 friend class WebNotificationTrayTest;
188 197
189 struct TargetBounds { 198 struct TargetBounds {
190 TargetBounds(); 199 TargetBounds();
191 ~TargetBounds(); 200 ~TargetBounds();
192 201
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // needs to be removed from the available work area. 360 // needs to be removed from the available work area.
352 int chromevox_panel_height_; 361 int chromevox_panel_height_;
353 362
354 // The show hide animation duration override or 0 for default. 363 // The show hide animation duration override or 0 for default.
355 int duration_override_in_ms_; 364 int duration_override_in_ms_;
356 365
357 // The current shelf background. Should not be assigned to directly, use 366 // The current shelf background. Should not be assigned to directly, use
358 // MaybeUpdateShelfBackground() instead. 367 // MaybeUpdateShelfBackground() instead.
359 ShelfBackgroundType shelf_background_type_; 368 ShelfBackgroundType shelf_background_type_;
360 369
370 ScopedObserver<keyboard::KeyboardController,
371 keyboard::KeyboardControllerObserver>
372 keyboard_observer_;
373
361 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 374 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
362 }; 375 };
363 376
364 } // namespace ash 377 } // namespace ash
365 378
366 #endif // ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_ 379 #endif // ASH_COMMON_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | ash/common/shelf/shelf_layout_manager.cc » ('j') | ash/root_window_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698