Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Side by Side Diff: ash/shelf/wm_shelf.h

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf_window_watcher_unittest.cc ('k') | ash/shelf/wm_shelf.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ash/shelf/shelf_locking_manager.h" 13 #include "ash/shelf/shelf_locking_manager.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 15
16 namespace aura {
17 class Window;
18 }
19
16 namespace gfx { 20 namespace gfx {
17 class Rect; 21 class Rect;
18 } 22 }
19 23
20 namespace ui { 24 namespace ui {
21 class GestureEvent; 25 class GestureEvent;
22 } 26 }
23 27
24 namespace ash { 28 namespace ash {
25 29
(...skipping 11 matching lines...) Expand all
37 // Controller for the shelf state. One per display, because each display might 41 // Controller for the shelf state. One per display, because each display might
38 // have different shelf alignment, autohide, etc. Exists for the lifetime of the 42 // have different shelf alignment, autohide, etc. Exists for the lifetime of the
39 // root window controller. 43 // root window controller.
40 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver { 44 class ASH_EXPORT WmShelf : public ShelfLayoutManagerObserver {
41 public: 45 public:
42 WmShelf(); 46 WmShelf();
43 ~WmShelf() override; 47 ~WmShelf() override;
44 48
45 // Returns the shelf for the display that |window| is on. Note that the shelf 49 // Returns the shelf for the display that |window| is on. Note that the shelf
46 // widget may not exist, or the shelf may not be visible. 50 // widget may not exist, or the shelf may not be visible.
47 static WmShelf* ForWindow(WmWindow* window); 51 static WmShelf* ForWindow(aura::Window* window);
48 52
49 // Returns if shelf alignment options are enabled, and the user is able to 53 // Returns if shelf alignment options are enabled, and the user is able to
50 // adjust the alignment (eg. not allowed in guest and supervised user modes). 54 // adjust the alignment (eg. not allowed in guest and supervised user modes).
51 static bool CanChangeShelfAlignment(); 55 static bool CanChangeShelfAlignment();
52 56
53 void CreateShelfWidget(WmWindow* root); 57 void CreateShelfWidget(WmWindow* root);
54 void ShutdownShelfWidget(); 58 void ShutdownShelfWidget();
55 void DestroyShelfWidget(); 59 void DestroyShelfWidget();
56 60
57 ShelfLayoutManager* shelf_layout_manager() const { 61 ShelfLayoutManager* shelf_layout_manager() const {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // Forwards touch gestures on a bezel sensor to the shelf. 171 // Forwards touch gestures on a bezel sensor to the shelf.
168 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647 172 // TODO(mash): Facilitate simliar functionality in mash: crbug.com/636647
169 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_; 173 std::unique_ptr<ShelfBezelEventHandler> bezel_event_handler_;
170 174
171 DISALLOW_COPY_AND_ASSIGN(WmShelf); 175 DISALLOW_COPY_AND_ASSIGN(WmShelf);
172 }; 176 };
173 177
174 } // namespace ash 178 } // namespace ash
175 179
176 #endif // ASH_SHELF_WM_SHELF_H_ 180 #endif // ASH_SHELF_WM_SHELF_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_window_watcher_unittest.cc ('k') | ash/shelf/wm_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698