| 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 |
| 11 namespace gfx { | 11 namespace gfx { |
| 12 class Rect; | 12 class Rect; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 | 16 |
| 17 class WmShelfObserver; | 17 class WmShelfObserver; |
| 18 class WmWindow; | 18 class WmWindow; |
| 19 | 19 |
| 20 // Used for accessing global state. | 20 // Used for accessing global state. |
| 21 class ASH_EXPORT WmShelf { | 21 class ASH_EXPORT WmShelf { |
| 22 public: | 22 public: |
| 23 // Returns the window showing the shelf. | 23 // Returns the window showing the shelf. |
| 24 virtual WmWindow* GetWindow() = 0; | 24 virtual WmWindow* GetWindow() = 0; |
| 25 | 25 |
| 26 virtual ShelfAlignment GetAlignment() const = 0; | 26 virtual ShelfAlignment GetAlignment() const = 0; |
| 27 virtual void SetAlignment(ShelfAlignment alignment) = 0; |
| 28 |
| 29 virtual ShelfAutoHideBehavior GetAutoHideBehavior() const = 0; |
| 30 virtual void SetAutoHideBehavior(ShelfAutoHideBehavior behavior) = 0; |
| 27 | 31 |
| 28 virtual ShelfBackgroundType GetBackgroundType() const = 0; | 32 virtual ShelfBackgroundType GetBackgroundType() const = 0; |
| 29 | 33 |
| 30 virtual void UpdateVisibilityState() = 0; | 34 virtual void UpdateVisibilityState() = 0; |
| 31 | 35 |
| 32 virtual ShelfVisibilityState GetVisibilityState() const = 0; | 36 virtual ShelfVisibilityState GetVisibilityState() const = 0; |
| 33 | 37 |
| 34 virtual void UpdateIconPositionForWindow(WmWindow* window) = 0; | 38 virtual void UpdateIconPositionForWindow(WmWindow* window) = 0; |
| 35 | 39 |
| 36 // Returns the screen bounds of the item for the specified window. If there is | 40 // Returns the screen bounds of the item for the specified window. If there is |
| 37 // no item for the specified window an empty rect is returned. | 41 // no item for the specified window an empty rect is returned. |
| 38 virtual gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) = 0; | 42 virtual gfx::Rect GetScreenBoundsOfItemIconForWindow(WmWindow* window) = 0; |
| 39 | 43 |
| 40 virtual void AddObserver(WmShelfObserver* observer) = 0; | 44 virtual void AddObserver(WmShelfObserver* observer) = 0; |
| 41 virtual void RemoveObserver(WmShelfObserver* observer) = 0; | 45 virtual void RemoveObserver(WmShelfObserver* observer) = 0; |
| 42 | 46 |
| 43 protected: | 47 protected: |
| 44 virtual ~WmShelf() {} | 48 virtual ~WmShelf() {} |
| 45 }; | 49 }; |
| 46 | 50 |
| 47 } // namespace ash | 51 } // namespace ash |
| 48 | 52 |
| 49 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ | 53 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ |
| OLD | NEW |