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

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

Issue 2177663002: mash: Move ownership of ShelfDelegate to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix wallpaper tests again Created 4 years, 5 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/metrics/user_metrics_recorder.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 class ShelfTestAPI; 47 class ShelfTestAPI;
48 } 48 }
49 49
50 // Controller for shelf state. All access to state (visibility, auto-hide, etc.) 50 // Controller for shelf state. All access to state (visibility, auto-hide, etc.)
51 // should occur via this class. 51 // should occur via this class.
52 class ASH_EXPORT Shelf { 52 class ASH_EXPORT Shelf {
53 public: 53 public:
54 static const char kNativeViewName[]; 54 static const char kNativeViewName[];
55 55
56 Shelf(ShelfModel* model, 56 Shelf(ShelfModel* model,
57 ShelfDelegate* delegate,
58 WmShelf* wm_shelf, 57 WmShelf* wm_shelf,
59 ShelfWidget* widget); 58 ShelfWidget* widget);
60 virtual ~Shelf(); 59 virtual ~Shelf();
61 60
62 // 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.
63 // 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
64 // have multiple displays. 63 // have multiple displays.
65 static Shelf* ForPrimaryDisplay(); 64 static Shelf* ForPrimaryDisplay();
66 65
67 // 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
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // Returns ApplicationDragAndDropHost for this shelf. 152 // Returns ApplicationDragAndDropHost for this shelf.
154 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); 153 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList();
155 154
156 ShelfLockingManager* shelf_locking_manager_for_testing() { 155 ShelfLockingManager* shelf_locking_manager_for_testing() {
157 return &shelf_locking_manager_; 156 return &shelf_locking_manager_;
158 } 157 }
159 158
160 private: 159 private:
161 friend class test::ShelfTestAPI; 160 friend class test::ShelfTestAPI;
162 161
163 ShelfDelegate* delegate_;
164 // The shelf controller. Owned by the root window controller. 162 // The shelf controller. Owned by the root window controller.
165 WmShelf* wm_shelf_; 163 WmShelf* wm_shelf_;
166 ShelfWidget* shelf_widget_; 164 ShelfWidget* shelf_widget_;
167 ShelfView* shelf_view_; 165 ShelfView* shelf_view_;
168 ShelfLockingManager shelf_locking_manager_; 166 ShelfLockingManager shelf_locking_manager_;
169 167
170 ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM; 168 ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM;
171 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; 169 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
172 170
173 DISALLOW_COPY_AND_ASSIGN(Shelf); 171 DISALLOW_COPY_AND_ASSIGN(Shelf);
174 }; 172 };
175 173
176 } // namespace ash 174 } // namespace ash
177 175
178 #endif // ASH_SHELF_SHELF_H_ 176 #endif // ASH_SHELF_SHELF_H_
OLDNEW
« no previous file with comments | « ash/metrics/user_metrics_recorder.cc ('k') | ash/shelf/shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698