| OLD | NEW |
| 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" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 } | 208 } |
| 209 | 209 |
| 210 template<typename T> | 210 template<typename T> |
| 211 T PrimaryAxisValue(T horizontal, T vertical) const { | 211 T PrimaryAxisValue(T horizontal, T vertical) const { |
| 212 return IsHorizontalAlignment() ? horizontal : vertical; | 212 return IsHorizontalAlignment() ? horizontal : vertical; |
| 213 } | 213 } |
| 214 | 214 |
| 215 // Is the shelf's alignment horizontal? | 215 // Is the shelf's alignment horizontal? |
| 216 bool IsHorizontalAlignment() const; | 216 bool IsHorizontalAlignment() const; |
| 217 | 217 |
| 218 // Set the height of the ChromeVox panel, which takes away space from the |
| 219 // available work area from the top of the screen. |
| 220 void SetChromeVoxPanelHeight(int height); |
| 221 |
| 218 // Returns a ShelfLayoutManager on the display which has a shelf for | 222 // Returns a ShelfLayoutManager on the display which has a shelf for |
| 219 // given |window|. See RootWindowController::ForShelf for more info. | 223 // given |window|. See RootWindowController::ForShelf for more info. |
| 220 static ShelfLayoutManager* ForShelf(aura::Window* window); | 224 static ShelfLayoutManager* ForShelf(aura::Window* window); |
| 221 | 225 |
| 222 private: | 226 private: |
| 223 class AutoHideEventFilter; | 227 class AutoHideEventFilter; |
| 224 class UpdateShelfObserver; | 228 class UpdateShelfObserver; |
| 225 friend class AshPopupAlignmentDelegateTest; | 229 friend class AshPopupAlignmentDelegateTest; |
| 226 friend class ash::ScreenAsh; | 230 friend class ash::ScreenAsh; |
| 227 friend class PanelLayoutManagerTest; | 231 friend class PanelLayoutManagerTest; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 // The bounds of the keyboard. | 409 // The bounds of the keyboard. |
| 406 gfx::Rect keyboard_bounds_; | 410 gfx::Rect keyboard_bounds_; |
| 407 | 411 |
| 408 // The bounds of the dock. | 412 // The bounds of the dock. |
| 409 gfx::Rect dock_bounds_; | 413 gfx::Rect dock_bounds_; |
| 410 | 414 |
| 411 // The bounds within the root window not occupied by the shelf nor the virtual | 415 // The bounds within the root window not occupied by the shelf nor the virtual |
| 412 // keyboard. | 416 // keyboard. |
| 413 gfx::Rect user_work_area_bounds_; | 417 gfx::Rect user_work_area_bounds_; |
| 414 | 418 |
| 419 // The height of the ChromeVox panel at the top of the screen, which |
| 420 // needs to be removed from the available work area. |
| 421 int chromevox_panel_height_; |
| 422 |
| 415 // The show hide animation duration override or 0 for default. | 423 // The show hide animation duration override or 0 for default. |
| 416 int duration_override_in_ms_; | 424 int duration_override_in_ms_; |
| 417 | 425 |
| 418 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 426 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 419 }; | 427 }; |
| 420 | 428 |
| 421 } // namespace ash | 429 } // namespace ash |
| 422 | 430 |
| 423 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 431 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |