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 #include "ash/shelf/shelf_layout_manager_observer.h" | 10 #include "ash/shelf/shelf_layout_manager_observer.h" |
| 11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
| 12 | 12 |
| 13 namespace gfx { | 13 namespace gfx { |
| 14 class Rect; | 14 class Rect; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 class GestureEvent; | 18 class GestureEvent; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace ash { | 21 namespace ash { |
| 22 | 22 |
| 23 class Shelf; | 23 class Shelf; |
| 24 class ShelfLayoutManager; | 24 class ShelfLayoutManager; |
| 25 class ShelfLockingManager; | 25 class ShelfLockingManager; |
| 26 class ShelfView; | 26 class ShelfView; |
| 27 class StatusAreaWidget; | |
| 27 class WmDimmerView; | 28 class WmDimmerView; |
| 28 class WmShelfObserver; | 29 class WmShelfObserver; |
| 29 class WmWindow; | 30 class WmWindow; |
| 30 | 31 |
| 31 // Used for accessing global state. | 32 // Used for accessing global state. |
| 32 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { | 33 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { |
| 33 public: | 34 public: |
| 34 void SetShelf(Shelf* shelf); | 35 void SetShelf(Shelf* shelf); |
| 35 void ClearShelf(); | 36 void ClearShelf(); |
| 36 Shelf* shelf() const { return shelf_; } | 37 Shelf* shelf() const { return shelf_; } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 104 // Handles a gesture |event| coming from a source outside the shelf widget | 105 // Handles a gesture |event| coming from a source outside the shelf widget |
| 105 // (e.g. the status area widget). Allows support for behaviors like toggling | 106 // (e.g. the status area widget). Allows support for behaviors like toggling |
| 106 // auto-hide with a swipe, even if that gesture event hits another window. | 107 // auto-hide with a swipe, even if that gesture event hits another window. |
| 107 // Returns true if the event was handled. | 108 // Returns true if the event was handled. |
| 108 bool ProcessGestureEvent(const ui::GestureEvent& event); | 109 bool ProcessGestureEvent(const ui::GestureEvent& event); |
| 109 | 110 |
| 110 void AddObserver(WmShelfObserver* observer); | 111 void AddObserver(WmShelfObserver* observer); |
| 111 void RemoveObserver(WmShelfObserver* observer); | 112 void RemoveObserver(WmShelfObserver* observer); |
| 112 | 113 |
| 113 void NotifyShelfIconPositionsChanged(); | 114 void NotifyShelfIconPositionsChanged(); |
| 115 StatusAreaWidget* GetStatusAreaWidget(); | |
|
yoshiki
2016/08/18 08:39:08
nit: Please make this const method.
yiyix
2016/08/18 20:01:42
Done.
| |
| 114 | 116 |
| 115 void SetVirtualKeyboardBoundsForTesting(const gfx::Rect& bounds); | 117 void SetVirtualKeyboardBoundsForTesting(const gfx::Rect& bounds); |
| 116 ShelfLockingManager* GetShelfLockingManagerForTesting(); | 118 ShelfLockingManager* GetShelfLockingManagerForTesting(); |
| 117 ShelfView* GetShelfViewForTesting(); | 119 ShelfView* GetShelfViewForTesting(); |
| 118 | 120 |
| 119 protected: | 121 protected: |
| 120 WmShelf(); | 122 WmShelf(); |
| 121 ~WmShelf() override; | 123 ~WmShelf() override; |
| 122 | 124 |
| 123 // ShelfLayoutManagerObserver: | 125 // ShelfLayoutManagerObserver: |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 137 ShelfLayoutManager* shelf_layout_manager_ = nullptr; | 139 ShelfLayoutManager* shelf_layout_manager_ = nullptr; |
| 138 | 140 |
| 139 base::ObserverList<WmShelfObserver> observers_; | 141 base::ObserverList<WmShelfObserver> observers_; |
| 140 | 142 |
| 141 DISALLOW_COPY_AND_ASSIGN(WmShelf); | 143 DISALLOW_COPY_AND_ASSIGN(WmShelf); |
| 142 }; | 144 }; |
| 143 | 145 |
| 144 } // namespace ash | 146 } // namespace ash |
| 145 | 147 |
| 146 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ | 148 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ |
| OLD | NEW |