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

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

Issue 1742953002: Simplify ash shelf layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore ConvertRectToScreen calls. Created 4 years, 9 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 "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shelf/shelf_constants.h" 9 #include "ash/shelf/shelf_constants.h"
10 #include "ash/shelf/shelf_types.h" 10 #include "ash/shelf/shelf_types.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // A negative index launches the last shelf item in the shelf. 117 // A negative index launches the last shelf item in the shelf.
118 void LaunchAppIndexAt(int item_index); 118 void LaunchAppIndexAt(int item_index);
119 119
120 ShelfWidget* shelf_widget() { return shelf_widget_; } 120 ShelfWidget* shelf_widget() { return shelf_widget_; }
121 121
122 // TODO(msw): ShelfLayoutManager should not be accessed externally. 122 // TODO(msw): ShelfLayoutManager should not be accessed externally.
123 ShelfLayoutManager* shelf_layout_manager() { 123 ShelfLayoutManager* shelf_layout_manager() {
124 return shelf_widget_->shelf_layout_manager(); 124 return shelf_widget_->shelf_layout_manager();
125 } 125 }
126 126
127 // Set the bounds of the shelf view.
128 void SetShelfViewBounds(gfx::Rect bounds);
129 gfx::Rect GetShelfViewBounds() const;
130
131 // Returns rectangle bounding all visible shelf items. Used screen coordinate 127 // Returns rectangle bounding all visible shelf items. Used screen coordinate
132 // system. 128 // system.
133 gfx::Rect GetVisibleItemsBoundsInScreen() const; 129 gfx::Rect GetVisibleItemsBoundsInScreen() const;
134 130
135 // Returns ApplicationDragAndDropHost for this shelf. 131 // Returns ApplicationDragAndDropHost for this shelf.
136 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); 132 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList();
137 133
138 private: 134 private:
139 friend class test::ShelfTestAPI; 135 friend class test::ShelfTestAPI;
140 136
141 // ShelfView used to display icons. 137 // ShelfView used to display icons.
142 ShelfView* shelf_view_; 138 ShelfView* shelf_view_;
143 139
144 ShelfAlignment alignment_; 140 ShelfAlignment alignment_;
145 141
146 ShelfDelegate* delegate_; 142 ShelfDelegate* delegate_;
147 143
148 ShelfWidget* shelf_widget_; 144 ShelfWidget* shelf_widget_;
149 145
150 DISALLOW_COPY_AND_ASSIGN(Shelf); 146 DISALLOW_COPY_AND_ASSIGN(Shelf);
151 }; 147 };
152 148
153 } // namespace ash 149 } // namespace ash
154 150
155 #endif // ASH_SHELF_SHELF_H_ 151 #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