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

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

Issue 1274563004: Show ChromeVox caption panel when spoken feedback is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromevox_panel_html
Patch Set: Add SetDisplayWorkAreaInsetsForTesting for tests Created 5 years, 1 month 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_SHELF_SHELF_LAYOUT_MANAGER_H_ 5 #ifndef ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 6 #define ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/session/session_state_observer.h" 11 #include "ash/session/session_state_observer.h"
12 #include "ash/shelf/background_animator.h" 12 #include "ash/shelf/background_animator.h"
13 #include "ash/shelf/shelf.h" 13 #include "ash/shelf/shelf.h"
14 #include "ash/shelf/shelf_types.h" 14 #include "ash/shelf/shelf_types.h"
15 #include "ash/shell_observer.h" 15 #include "ash/shell_observer.h"
16 #include "ash/snap_to_pixel_layout_manager.h" 16 #include "ash/snap_to_pixel_layout_manager.h"
17 #include "ash/system/status_area_widget.h" 17 #include "ash/system/status_area_widget.h"
18 #include "ash/wm/dock/docked_window_layout_manager_observer.h" 18 #include "ash/wm/dock/docked_window_layout_manager_observer.h"
19 #include "ash/wm/lock_state_observer.h" 19 #include "ash/wm/lock_state_observer.h"
20 #include "ash/wm/workspace/workspace_types.h" 20 #include "ash/wm/workspace/workspace_types.h"
21 #include "base/basictypes.h" 21 #include "base/basictypes.h"
22 #include "base/compiler_specific.h" 22 #include "base/compiler_specific.h"
23 #include "base/gtest_prod_util.h" 23 #include "base/gtest_prod_util.h"
24 #include "base/logging.h" 24 #include "base/logging.h"
25 #include "base/observer_list.h" 25 #include "base/observer_list.h"
26 #include "base/timer/timer.h" 26 #include "base/timer/timer.h"
27 #include "ui/gfx/geometry/insets.h"
28 #include "ui/gfx/geometry/rect.h" 27 #include "ui/gfx/geometry/rect.h"
29 #include "ui/keyboard/keyboard_controller.h" 28 #include "ui/keyboard/keyboard_controller.h"
30 #include "ui/keyboard/keyboard_controller_observer.h" 29 #include "ui/keyboard/keyboard_controller_observer.h"
31 #include "ui/wm/public/activation_change_observer.h" 30 #include "ui/wm/public/activation_change_observer.h"
32 31
33 namespace aura { 32 namespace aura {
34 class RootWindow; 33 class RootWindow;
35 } 34 }
36 35
36 namespace gfx {
37 class Insets;
38 }
39
37 namespace ui { 40 namespace ui {
38 class GestureEvent; 41 class GestureEvent;
39 class ImplicitAnimationObserver; 42 class ImplicitAnimationObserver;
40 } 43 }
41 44
42 namespace ash { 45 namespace ash {
43 class PanelLayoutManagerTest; 46 class PanelLayoutManagerTest;
44 class ScreenAsh; 47 class ScreenAsh;
45 class ShelfBezelEventFilter; 48 class ShelfBezelEventFilter;
46 class ShelfLayoutManagerObserver; 49 class ShelfLayoutManagerObserver;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 211 }
209 212
210 template<typename T> 213 template<typename T>
211 T PrimaryAxisValue(T horizontal, T vertical) const { 214 T PrimaryAxisValue(T horizontal, T vertical) const {
212 return IsHorizontalAlignment() ? horizontal : vertical; 215 return IsHorizontalAlignment() ? horizontal : vertical;
213 } 216 }
214 217
215 // Is the shelf's alignment horizontal? 218 // Is the shelf's alignment horizontal?
216 bool IsHorizontalAlignment() const; 219 bool IsHorizontalAlignment() const;
217 220
221 // Get the work area insets due to the shelf and virtual keyboard.
222 gfx::Insets GetWorkAreaInsets() const;
223
218 // Returns a ShelfLayoutManager on the display which has a shelf for 224 // Returns a ShelfLayoutManager on the display which has a shelf for
219 // given |window|. See RootWindowController::ForShelf for more info. 225 // given |window|. See RootWindowController::ForShelf for more info.
220 static ShelfLayoutManager* ForShelf(aura::Window* window); 226 static ShelfLayoutManager* ForShelf(aura::Window* window);
221 227
222 private: 228 private:
223 class AutoHideEventFilter; 229 class AutoHideEventFilter;
224 class UpdateShelfObserver; 230 class UpdateShelfObserver;
225 friend class AshPopupAlignmentDelegateTest; 231 friend class AshPopupAlignmentDelegateTest;
226 friend class ash::ScreenAsh; 232 friend class ash::ScreenAsh;
227 friend class PanelLayoutManagerTest; 233 friend class PanelLayoutManagerTest;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // The bounds of the keyboard. 411 // The bounds of the keyboard.
406 gfx::Rect keyboard_bounds_; 412 gfx::Rect keyboard_bounds_;
407 413
408 // The bounds of the dock. 414 // The bounds of the dock.
409 gfx::Rect dock_bounds_; 415 gfx::Rect dock_bounds_;
410 416
411 // The bounds within the root window not occupied by the shelf nor the virtual 417 // The bounds within the root window not occupied by the shelf nor the virtual
412 // keyboard. 418 // keyboard.
413 gfx::Rect user_work_area_bounds_; 419 gfx::Rect user_work_area_bounds_;
414 420
421 // The insets from the sides of the screen taken up by the shelf or virtual
422 // keyboard.
423 gfx::Insets work_area_insets_;
424
415 // The show hide animation duration override or 0 for default. 425 // The show hide animation duration override or 0 for default.
416 int duration_override_in_ms_; 426 int duration_override_in_ms_;
417 427
418 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); 428 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager);
419 }; 429 };
420 430
421 } // namespace ash 431 } // namespace ash
422 432
423 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ 433 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698