| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WM_SHELF_H_ | 5 #ifndef ASH_COMMON_SHELF_WM_SHELF_H_ |
| 6 #define ASH_COMMON_SHELF_WM_SHELF_H_ | 6 #define ASH_COMMON_SHELF_WM_SHELF_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/common/shelf/shelf_types.h" | 9 #include "ash/common/shelf/shelf_types.h" |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 // Used for accessing global state. | 27 // Used for accessing global state. |
| 28 class ASH_EXPORT WmShelf { | 28 class ASH_EXPORT WmShelf { |
| 29 public: | 29 public: |
| 30 // Returns the window showing the shelf. | 30 // Returns the window showing the shelf. |
| 31 virtual WmWindow* GetWindow() = 0; | 31 virtual WmWindow* GetWindow() = 0; |
| 32 | 32 |
| 33 virtual ShelfAlignment GetAlignment() const = 0; | 33 virtual ShelfAlignment GetAlignment() const = 0; |
| 34 virtual void SetAlignment(ShelfAlignment alignment) = 0; | 34 virtual void SetAlignment(ShelfAlignment alignment) = 0; |
| 35 | 35 |
| 36 // Returns true if the shelf alignment is horizontal (i.e. at the bottom). |
| 37 bool IsHorizontalAlignment() const; |
| 38 |
| 39 // Returns a value based on shelf alignment. |
| 40 int SelectValueForShelfAlignment(int bottom, int left, int right) const; |
| 41 |
| 42 // Returns |horizontal| is shelf is horizontal, otherwise |vertical|. |
| 43 int PrimaryAxisValue(int horizontal, int vertical) const; |
| 44 |
| 36 virtual ShelfAutoHideBehavior GetAutoHideBehavior() const = 0; | 45 virtual ShelfAutoHideBehavior GetAutoHideBehavior() const = 0; |
| 37 virtual void SetAutoHideBehavior(ShelfAutoHideBehavior behavior) = 0; | 46 virtual void SetAutoHideBehavior(ShelfAutoHideBehavior behavior) = 0; |
| 38 | 47 |
| 39 virtual ShelfAutoHideState GetAutoHideState() const = 0; | 48 virtual ShelfAutoHideState GetAutoHideState() const = 0; |
| 40 | 49 |
| 41 // Invoke when the auto-hide state may have changed (for example, when the | 50 // Invoke when the auto-hide state may have changed (for example, when the |
| 42 // system tray bubble opens it should force the shelf to be visible). | 51 // system tray bubble opens it should force the shelf to be visible). |
| 43 virtual void UpdateAutoHideState() = 0; | 52 virtual void UpdateAutoHideState() = 0; |
| 44 | 53 |
| 45 virtual ShelfBackgroundType GetBackgroundType() const = 0; | 54 virtual ShelfBackgroundType GetBackgroundType() const = 0; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 virtual ShelfLockingManager* GetShelfLockingManagerForTesting() = 0; | 104 virtual ShelfLockingManager* GetShelfLockingManagerForTesting() = 0; |
| 96 virtual ShelfView* GetShelfViewForTesting() = 0; | 105 virtual ShelfView* GetShelfViewForTesting() = 0; |
| 97 | 106 |
| 98 protected: | 107 protected: |
| 99 virtual ~WmShelf() {} | 108 virtual ~WmShelf() {} |
| 100 }; | 109 }; |
| 101 | 110 |
| 102 } // namespace ash | 111 } // namespace ash |
| 103 | 112 |
| 104 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ | 113 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ |
| OLD | NEW |