OLD | NEW |
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 #include "ash/shelf/shelf.h" | 5 #include "ash/shelf/shelf.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "ash/aura/wm_window_aura.h" | 10 #include "ash/aura/wm_window_aura.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 } | 188 } |
189 | 189 |
190 bool Shelf::IsVisible() const { | 190 bool Shelf::IsVisible() const { |
191 return shelf_view_->visible(); | 191 return shelf_view_->visible(); |
192 } | 192 } |
193 | 193 |
194 void Shelf::SchedulePaint() { | 194 void Shelf::SchedulePaint() { |
195 shelf_view_->SchedulePaintForAllButtons(); | 195 shelf_view_->SchedulePaintForAllButtons(); |
196 } | 196 } |
197 | 197 |
198 views::View* Shelf::GetAppListButtonView() const { | 198 AppListButton* Shelf::GetAppListButton() const { |
199 return shelf_view_->GetAppListButtonView(); | 199 return shelf_view_->GetAppListButton(); |
200 } | 200 } |
201 | 201 |
202 void Shelf::LaunchAppIndexAt(int item_index) { | 202 void Shelf::LaunchAppIndexAt(int item_index) { |
203 ShelfModel* shelf_model = shelf_view_->model(); | 203 ShelfModel* shelf_model = shelf_view_->model(); |
204 const ShelfItems& items = shelf_model->items(); | 204 const ShelfItems& items = shelf_model->items(); |
205 int item_count = shelf_model->item_count(); | 205 int item_count = shelf_model->item_count(); |
206 int indexes_left = item_index >= 0 ? item_index : item_count; | 206 int indexes_left = item_index >= 0 ? item_index : item_count; |
207 int found_index = -1; | 207 int found_index = -1; |
208 | 208 |
209 // Iterating until we have hit the index we are interested in which | 209 // Iterating until we have hit the index we are interested in which |
(...skipping 16 matching lines...) Expand all Loading... |
226 | 226 |
227 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const { | 227 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const { |
228 return shelf_view_->GetVisibleItemsBoundsInScreen(); | 228 return shelf_view_->GetVisibleItemsBoundsInScreen(); |
229 } | 229 } |
230 | 230 |
231 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { | 231 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { |
232 return shelf_view_; | 232 return shelf_view_; |
233 } | 233 } |
234 | 234 |
235 } // namespace ash | 235 } // namespace ash |
OLD | NEW |