| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class WmWindow; | 32 class WmWindow; |
| 33 | 33 |
| 34 // Controller for the shelf state. Exists for the lifetime of each root window | 34 // Controller for the shelf state. Exists for the lifetime of each root window |
| 35 // controller. Note that the shelf widget may not be created until after login. | 35 // controller. Note that the shelf widget may not be created until after login. |
| 36 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { | 36 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { |
| 37 public: | 37 public: |
| 38 // Returns the shelf for the display that |window| is on. Note that the shelf | 38 // Returns the shelf for the display that |window| is on. Note that the shelf |
| 39 // widget may not exist, or the shelf may not be visible. | 39 // widget may not exist, or the shelf may not be visible. |
| 40 static WmShelf* ForWindow(WmWindow* window); | 40 static WmShelf* ForWindow(WmWindow* window); |
| 41 | 41 |
| 42 // Returns if shelf alignment options are enabled, and the user is able to |
| 43 // adjust the alignment (eg. not allowed in guest and supervised user modes). |
| 44 static bool CanChangeShelfAlignment(); |
| 45 |
| 42 virtual void CreateShelfWidget(WmWindow* root); | 46 virtual void CreateShelfWidget(WmWindow* root); |
| 43 void ShutdownShelfWidget(); | 47 void ShutdownShelfWidget(); |
| 44 void DestroyShelfWidget(); | 48 void DestroyShelfWidget(); |
| 45 | 49 |
| 46 ShelfLayoutManager* shelf_layout_manager() const { | 50 ShelfLayoutManager* shelf_layout_manager() const { |
| 47 return shelf_layout_manager_; | 51 return shelf_layout_manager_; |
| 48 } | 52 } |
| 49 | 53 |
| 50 ShelfWidget* shelf_widget() { return shelf_widget_.get(); } | 54 ShelfWidget* shelf_widget() { return shelf_widget_.get(); } |
| 51 | 55 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; | 175 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; |
| 172 | 176 |
| 173 base::ObserverList<WmShelfObserver> observers_; | 177 base::ObserverList<WmShelfObserver> observers_; |
| 174 | 178 |
| 175 DISALLOW_COPY_AND_ASSIGN(WmShelf); | 179 DISALLOW_COPY_AND_ASSIGN(WmShelf); |
| 176 }; | 180 }; |
| 177 | 181 |
| 178 } // namespace ash | 182 } // namespace ash |
| 179 | 183 |
| 180 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ | 184 #endif // ASH_COMMON_SHELF_WM_SHELF_H_ |
| OLD | NEW |