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

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

Issue 2039253002: Removing ash::Shelf::shelf_model() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@launcher_controller_shelf_model_2
Patch Set: Another rebase. 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 | « no previous file | 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>
11 11
12 #include "ash/ash_export.h" 12 #include "ash/ash_export.h"
13 #include "ash/common/shelf/shelf_constants.h" 13 #include "ash/common/shelf/shelf_constants.h"
14 #include "ash/common/shelf/shelf_types.h" 14 #include "ash/common/shelf/shelf_types.h"
15 #include "ash/shelf/shelf_locking_manager.h" 15 #include "ash/shelf/shelf_locking_manager.h"
16 #include "ash/shelf/shelf_view.h"
17 #include "ash/shelf/shelf_widget.h" 16 #include "ash/shelf/shelf_widget.h"
18 #include "base/macros.h" 17 #include "base/macros.h"
19 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
20 #include "ui/views/widget/widget_observer.h" 19 #include "ui/views/widget/widget_observer.h"
21 20
22 namespace app_list { 21 namespace app_list {
23 class ApplicationDragAndDropHost; 22 class ApplicationDragAndDropHost;
24 } 23 }
25 24
26 namespace aura { 25 namespace aura {
27 class Window; 26 class Window;
28 } 27 }
29 28
30 namespace gfx { 29 namespace gfx {
31 class Rect; 30 class Rect;
32 } 31 }
33 32
34 namespace views { 33 namespace views {
35 class View; 34 class View;
36 } 35 }
37 36
38 namespace ash { 37 namespace ash {
39 class FocusCycler; 38 class FocusCycler;
40 class ShelfDelegate; 39 class ShelfDelegate;
41 class ShelfIconObserver; 40 class ShelfIconObserver;
42 class ShelfModel; 41 class ShelfModel;
42 class ShelfView;
43 43
44 namespace test { 44 namespace test {
45 class ShelfTestAPI; 45 class ShelfTestAPI;
46 } 46 }
47 47
48 // Controller for shelf state. All access to state (visibility, auto-hide, etc.) 48 // Controller for shelf state. All access to state (visibility, auto-hide, etc.)
49 // should occur via this class. 49 // should occur via this class.
50 class ASH_EXPORT Shelf { 50 class ASH_EXPORT Shelf {
51 public: 51 public:
52 static const char kNativeViewName[]; 52 static const char kNativeViewName[];
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void SchedulePaint(); 133 void SchedulePaint();
134 134
135 views::View* GetAppListButtonView() const; 135 views::View* GetAppListButtonView() const;
136 136
137 // Launch a 0-indexed shelf item in the shelf. 137 // Launch a 0-indexed shelf item in the shelf.
138 // A negative index launches the last shelf item in the shelf. 138 // A negative index launches the last shelf item in the shelf.
139 void LaunchAppIndexAt(int item_index); 139 void LaunchAppIndexAt(int item_index);
140 140
141 ShelfWidget* shelf_widget() { return shelf_widget_; } 141 ShelfWidget* shelf_widget() { return shelf_widget_; }
142 142
143 ShelfModel* shelf_model() { return shelf_view_->model(); }
144
145 // TODO(msw): ShelfLayoutManager should not be accessed externally. 143 // TODO(msw): ShelfLayoutManager should not be accessed externally.
146 ShelfLayoutManager* shelf_layout_manager() { 144 ShelfLayoutManager* shelf_layout_manager() {
147 return shelf_widget_->shelf_layout_manager(); 145 return shelf_widget_->shelf_layout_manager();
148 } 146 }
149 147
150 // Returns rectangle bounding all visible shelf items. Used screen coordinate 148 // Returns rectangle bounding all visible shelf items. Used screen coordinate
151 // system. 149 // system.
152 gfx::Rect GetVisibleItemsBoundsInScreen() const; 150 gfx::Rect GetVisibleItemsBoundsInScreen() const;
153 151
154 // Returns ApplicationDragAndDropHost for this shelf. 152 // Returns ApplicationDragAndDropHost for this shelf.
155 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); 153 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList();
156 154
157 private: 155 private:
158 friend class test::ShelfTestAPI; 156 friend class test::ShelfTestAPI;
159 157
160 ShelfDelegate* delegate_; 158 ShelfDelegate* delegate_;
161 ShelfWidget* shelf_widget_; 159 ShelfWidget* shelf_widget_;
162 ShelfView* shelf_view_; 160 ShelfView* shelf_view_;
163 ShelfLockingManager shelf_locking_manager_; 161 ShelfLockingManager shelf_locking_manager_;
164 162
165 ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM; 163 ShelfAlignment alignment_ = SHELF_ALIGNMENT_BOTTOM;
166 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER; 164 ShelfAutoHideBehavior auto_hide_behavior_ = SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
167 165
168 DISALLOW_COPY_AND_ASSIGN(Shelf); 166 DISALLOW_COPY_AND_ASSIGN(Shelf);
169 }; 167 };
170 168
171 } // namespace ash 169 } // namespace ash
172 170
173 #endif // ASH_SHELF_SHELF_H_ 171 #endif // ASH_SHELF_SHELF_H_
OLDNEW
« no previous file with comments | « no previous file | ash/shelf/shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698