| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 176 } |
| 177 | 177 |
| 178 template <typename T> | 178 template <typename T> |
| 179 T PrimaryAxisValue(T horizontal, T vertical) const { | 179 T PrimaryAxisValue(T horizontal, T vertical) const { |
| 180 return IsHorizontalAlignment() ? horizontal : vertical; | 180 return IsHorizontalAlignment() ? horizontal : vertical; |
| 181 } | 181 } |
| 182 | 182 |
| 183 // Is the shelf's alignment horizontal? | 183 // Is the shelf's alignment horizontal? |
| 184 bool IsHorizontalAlignment() const; | 184 bool IsHorizontalAlignment() const; |
| 185 | 185 |
| 186 // Returns how the shelf background is painted. |
| 187 ShelfBackgroundType GetShelfBackgroundType() const; |
| 188 |
| 186 // Set the height of the ChromeVox panel, which takes away space from the | 189 // Set the height of the ChromeVox panel, which takes away space from the |
| 187 // available work area from the top of the screen. | 190 // available work area from the top of the screen. |
| 188 void SetChromeVoxPanelHeight(int height); | 191 void SetChromeVoxPanelHeight(int height); |
| 189 | 192 |
| 190 private: | 193 private: |
| 191 class AutoHideEventFilter; | 194 class AutoHideEventFilter; |
| 192 class RootWindowControllerObserverImpl; | 195 class RootWindowControllerObserverImpl; |
| 193 class UpdateShelfObserver; | 196 class UpdateShelfObserver; |
| 194 friend class PanelLayoutManagerTest; | 197 friend class PanelLayoutManagerTest; |
| 195 friend class ShelfLayoutManagerTest; | 198 friend class ShelfLayoutManagerTest; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 // Calculates the target bounds assuming visibility of |visible|. | 253 // Calculates the target bounds assuming visibility of |visible|. |
| 251 void CalculateTargetBounds(const State& state, TargetBounds* target_bounds); | 254 void CalculateTargetBounds(const State& state, TargetBounds* target_bounds); |
| 252 | 255 |
| 253 // Updates the target bounds if a gesture-drag is in progress. This is only | 256 // Updates the target bounds if a gesture-drag is in progress. This is only |
| 254 // used by |CalculateTargetBounds()|. | 257 // used by |CalculateTargetBounds()|. |
| 255 void UpdateTargetBoundsForGesture(TargetBounds* target_bounds) const; | 258 void UpdateTargetBoundsForGesture(TargetBounds* target_bounds) const; |
| 256 | 259 |
| 257 // Updates the background of the shelf. | 260 // Updates the background of the shelf. |
| 258 void UpdateShelfBackground(BackgroundAnimatorChangeType type); | 261 void UpdateShelfBackground(BackgroundAnimatorChangeType type); |
| 259 | 262 |
| 260 // Returns how the shelf background is painted. | |
| 261 ShelfBackgroundType GetShelfBackgroundType() const; | |
| 262 | |
| 263 // Updates the auto hide state immediately. | 263 // Updates the auto hide state immediately. |
| 264 void UpdateAutoHideStateNow(); | 264 void UpdateAutoHideStateNow(); |
| 265 | 265 |
| 266 // Stops the auto hide timer and clears | 266 // Stops the auto hide timer and clears |
| 267 // |mouse_over_shelf_when_auto_hide_timer_started_|. | 267 // |mouse_over_shelf_when_auto_hide_timer_started_|. |
| 268 void StopAutoHideTimer(); | 268 void StopAutoHideTimer(); |
| 269 | 269 |
| 270 // Returns the bounds of an additional region which can trigger showing the | 270 // Returns the bounds of an additional region which can trigger showing the |
| 271 // shelf. This region exists to make it easier to trigger showing the shelf | 271 // shelf. This region exists to make it easier to trigger showing the shelf |
| 272 // when the shelf is auto hidden and the shelf is on the boundary between | 272 // when the shelf is auto hidden and the shelf is on the boundary between |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 std::unique_ptr<RootWindowControllerObserverImpl> | 374 std::unique_ptr<RootWindowControllerObserverImpl> |
| 375 root_window_controller_observer_; | 375 root_window_controller_observer_; |
| 376 | 376 |
| 377 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); | 377 DISALLOW_COPY_AND_ASSIGN(ShelfLayoutManager); |
| 378 }; | 378 }; |
| 379 | 379 |
| 380 } // namespace ash | 380 } // namespace ash |
| 381 | 381 |
| 382 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ | 382 #endif // ASH_SHELF_SHELF_LAYOUT_MANAGER_H_ |
| OLD | NEW |