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_SHELF_WM_SHELF_H_ | 5 #ifndef ASH_SHELF_WM_SHELF_H_ |
6 #define ASH_SHELF_WM_SHELF_H_ | 6 #define ASH_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" |
11 #include "ash/public/cpp/shelf_types.h" | 11 #include "ash/public/cpp/shelf_types.h" |
12 #include "ash/shelf/shelf_layout_manager_observer.h" | 12 #include "ash/shelf/shelf_layout_manager_observer.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 | 14 |
| 15 namespace aura { |
| 16 class Window; |
| 17 } |
| 18 |
15 namespace gfx { | 19 namespace gfx { |
16 class Rect; | 20 class Rect; |
17 } | 21 } |
18 | 22 |
19 namespace ui { | 23 namespace ui { |
20 class GestureEvent; | 24 class GestureEvent; |
21 } | 25 } |
22 | 26 |
23 namespace ash { | 27 namespace ash { |
24 | 28 |
(...skipping 10 matching lines...) Expand all Loading... |
35 | 39 |
36 // Controller for the shelf state. Exists for the lifetime of each root window | 40 // Controller for the shelf state. Exists for the lifetime of each root window |
37 // controller. Note that the shelf widget may not be created until after login. | 41 // controller. Note that the shelf widget may not be created until after login. |
38 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { | 42 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { |
39 public: | 43 public: |
40 WmShelf(); | 44 WmShelf(); |
41 ~WmShelf() override; | 45 ~WmShelf() override; |
42 | 46 |
43 // Returns the shelf for the display that |window| is on. Note that the shelf | 47 // Returns the shelf for the display that |window| is on. Note that the shelf |
44 // widget may not exist, or the shelf may not be visible. | 48 // widget may not exist, or the shelf may not be visible. |
45 static WmShelf* ForWindow(WmWindow* window); | 49 static WmShelf* ForWindow(aura::Window* window); |
46 | 50 |
47 // Returns if shelf alignment options are enabled, and the user is able to | 51 // Returns if shelf alignment options are enabled, and the user is able to |
48 // adjust the alignment (eg. not allowed in guest and supervised user modes). | 52 // adjust the alignment (eg. not allowed in guest and supervised user modes). |
49 static bool CanChangeShelfAlignment(); | 53 static bool CanChangeShelfAlignment(); |
50 | 54 |
51 void CreateShelfWidget(WmWindow* root); | 55 void CreateShelfWidget(WmWindow* root); |
52 void ShutdownShelfWidget(); | 56 void ShutdownShelfWidget(); |
53 void DestroyShelfWidget(); | 57 void DestroyShelfWidget(); |
54 | 58 |
55 ShelfLayoutManager* shelf_layout_manager() const { | 59 ShelfLayoutManager* shelf_layout_manager() const { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 // Forwards touch gestures on a bezel sensor to the shelf. | 183 // Forwards touch gestures on a bezel sensor to the shelf. |
180 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647 | 184 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647 |
181 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_; | 185 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_; |
182 | 186 |
183 DISALLOW_COPY_AND_ASSIGN(WmShelf); | 187 DISALLOW_COPY_AND_ASSIGN(WmShelf); |
184 }; | 188 }; |
185 | 189 |
186 } // namespace ash | 190 } // namespace ash |
187 | 191 |
188 #endif // ASH_SHELF_WM_SHELF_H_ | 192 #endif // ASH_SHELF_WM_SHELF_H_ |
OLD | NEW |