Chromium Code Reviews| 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 ui { | 15 namespace ui { |
| 16 class GestureEvent; | 16 class GestureEvent; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ash { | 19 namespace ash { |
| 20 | 20 |
| 21 class ShelfLockingManager; | 21 class ShelfLockingManager; |
| 22 class ShelfView; | 22 class ShelfView; |
| 23 class WmDimmerView; | 23 class WmDimmerView; |
| 24 class WmShelfObserver; | 24 class WmShelfObserver; |
| 25 class WmWindow; | 25 class WmWindow; |
| 26 class StatusAreaWidget; | |
|
James Cook
2016/08/11 20:36:54
nit: alphabetize
yiyix
2016/08/18 00:42:59
Done.
| |
| 26 | 27 |
| 27 // Used for accessing global state. | 28 // Used for accessing global state. |
| 28 class ASH_EXPORT WmShelf { | 29 class ASH_EXPORT WmShelf { |
| 29 public: | 30 public: |
| 30 // Returns the window showing the shelf. | 31 // Returns the window showing the shelf. |
| 31 virtual WmWindow* GetWindow() = 0; | 32 virtual WmWindow* GetWindow() = 0; |
| 32 | 33 |
| 33 virtual ShelfAlignment GetAlignment() const = 0; | 34 virtual ShelfAlignment GetAlignment() const = 0; |
| 34 virtual void SetAlignment(ShelfAlignment alignment) = 0; | 35 virtual void SetAlignment(ShelfAlignment alignment) = 0; |
| 35 | 36 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 | 96 |
| 96 // Handles a gesture |event| coming from a source outside the shelf widget | 97 // Handles a gesture |event| coming from a source outside the shelf widget |
| 97 // (e.g. the status area widget). Allows support for behaviors like toggling | 98 // (e.g. the status area widget). Allows support for behaviors like toggling |
| 98 // auto-hide with a swipe, even if that gesture event hits another window. | 99 // auto-hide with a swipe, even if that gesture event hits another window. |
| 99 // Returns true if the event was handled. | 100 // Returns true if the event was handled. |
| 100 virtual bool ProcessGestureEvent(const ui::GestureEvent& event) = 0; | 101 virtual bool ProcessGestureEvent(const ui::GestureEvent& event) = 0; |
| 101 | 102 |
| 102 virtual void AddObserver(WmShelfObserver* observer) = 0; | 103 virtual void AddObserver(WmShelfObserver* observer) = 0; |
| 103 virtual void RemoveObserver(WmShelfObserver* observer) = 0; | 104 virtual void RemoveObserver(WmShelfObserver* observer) = 0; |
| 104 | 105 |
| 106 virtual StatusAreaWidget* GetStatusAreaWidget() = 0; | |
| 107 | |
| 105 // Simulates a virtual keyboard bounds update. | 108 // Simulates a virtual keyboard bounds update. |
| 106 virtual void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) = 0; | 109 virtual void SetKeyboardBoundsForTesting(const gfx::Rect& bounds) = 0; |
| 107 | 110 |
| 108 virtual ShelfLockingManager* GetShelfLockingManagerForTesting() = 0; | 111 virtual ShelfLockingManager* GetShelfLockingManagerForTesting() = 0; |
| 109 virtual ShelfView* GetShelfViewForTesting() = 0; | 112 virtual ShelfView* GetShelfViewForTesting() = 0; |
| 110 | 113 |
| 111 protected: | 114 protected: |
| 112 virtual ~WmShelf() {} | 115 virtual ~WmShelf() {} |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 } // namespace ash | 118 } // namespace ash |
| 116 | 119 |
| 117 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ | 120 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ |
| OLD | NEW |