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

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

Issue 2046843005: mash: Migrate shelf menus to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ash_shell_with_content Created 4 years, 6 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/root_window_controller.cc ('k') | ash/shelf/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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SHELF_H_ 5 #ifndef ASH_SHELF_SHELF_H_
6 #define ASH_SHELF_SHELF_H_ 6 #define ASH_SHELF_SHELF_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 22 matching lines...) Expand all
33 namespace views { 33 namespace views {
34 class View; 34 class View;
35 } 35 }
36 36
37 namespace ash { 37 namespace ash {
38 class FocusCycler; 38 class FocusCycler;
39 class ShelfDelegate; 39 class ShelfDelegate;
40 class ShelfIconObserver; 40 class ShelfIconObserver;
41 class ShelfModel; 41 class ShelfModel;
42 class ShelfView; 42 class ShelfView;
43 class WmShelf;
43 44
44 namespace test { 45 namespace test {
45 class ShelfTestAPI; 46 class ShelfTestAPI;
46 } 47 }
47 48
48 // Controller for shelf state. All access to state (visibility, auto-hide, etc.) 49 // Controller for shelf state. All access to state (visibility, auto-hide, etc.)
49 // should occur via this class. 50 // should occur via this class.
50 class ASH_EXPORT Shelf { 51 class ASH_EXPORT Shelf {
51 public: 52 public:
52 static const char kNativeViewName[]; 53 static const char kNativeViewName[];
53 54
54 Shelf(ShelfModel* model, ShelfDelegate* delegate, ShelfWidget* widget); 55 Shelf(ShelfModel* model,
56 ShelfDelegate* delegate,
57 WmShelf* wm_shelf,
58 ShelfWidget* widget);
55 virtual ~Shelf(); 59 virtual ~Shelf();
56 60
57 // Return the shelf for the primary display. NULL if no user is logged in yet. 61 // Return the shelf for the primary display. NULL if no user is logged in yet.
58 // Useful for tests. For production code use ForWindow() because the user may 62 // Useful for tests. For production code use ForWindow() because the user may
59 // have multiple displays. 63 // have multiple displays.
60 static Shelf* ForPrimaryDisplay(); 64 static Shelf* ForPrimaryDisplay();
61 65
62 // Return the shelf for the display that |window| is currently on, or a shelf 66 // Return the shelf for the display that |window| is currently on, or a shelf
63 // on primary display if the shelf per display feature is disabled. NULL if no 67 // on primary display if the shelf per display feature is disabled. NULL if no
64 // user is logged in yet. 68 // user is logged in yet.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // system. 153 // system.
150 gfx::Rect GetVisibleItemsBoundsInScreen() const; 154 gfx::Rect GetVisibleItemsBoundsInScreen() const;
151 155
152 // Returns ApplicationDragAndDropHost for this shelf. 156 // Returns ApplicationDragAndDropHost for this shelf.
153 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); 157 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList();
154 158
155 private: 159 private:
156 friend class test::ShelfTestAPI; 160 friend class test::ShelfTestAPI;
157 161
158 ShelfDelegate* delegate_; 162 ShelfDelegate* delegate_;
163 // The shelf controller. Owned by the root window controller.
164 WmShelf* wm_shelf_;
159 ShelfWidget* shelf_widget_; 165 ShelfWidget* shelf_widget_;
160 ShelfView* shelf_view_; 166 ShelfView* shelf_view_;
161 ShelfLockingManager shelf_locking_manager_; 167 ShelfLockingManager shelf_locking_manager_;
162 168
163 ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM; 169 ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM;
164 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; 170 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
165 171
166 DISALLOW_COPY_AND_ASSIGN(Shelf); 172 DISALLOW_COPY_AND_ASSIGN(Shelf);
167 }; 173 };
168 174
169 } // namespace ash 175 } // namespace ash
170 176
171 #endif // ASH_SHELF_SHELF_H_ 177 #endif // ASH_SHELF_SHELF_H_
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698