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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 | 174 |
175 bool Shelf::IsVisible() const { | 175 bool Shelf::IsVisible() const { |
176 return shelf_view_->visible(); | 176 return shelf_view_->visible(); |
177 } | 177 } |
178 | 178 |
179 void Shelf::SchedulePaint() { | 179 void Shelf::SchedulePaint() { |
180 shelf_view_->SchedulePaintForAllButtons(); | 180 shelf_view_->SchedulePaintForAllButtons(); |
181 } | 181 } |
182 | 182 |
183 views::View* Shelf::GetAppListButtonView() const { | 183 AppListButton* Shelf::GetAppListButton() const { |
184 return shelf_view_->GetAppListButtonView(); | 184 return shelf_view_->GetAppListButton(); |
185 } | 185 } |
186 | 186 |
187 void Shelf::LaunchAppIndexAt(int item_index) { | 187 void Shelf::LaunchAppIndexAt(int item_index) { |
188 ShelfModel* shelf_model = shelf_view_->model(); | 188 ShelfModel* shelf_model = shelf_view_->model(); |
189 const ShelfItems& items = shelf_model->items(); | 189 const ShelfItems& items = shelf_model->items(); |
190 int item_count = shelf_model->item_count(); | 190 int item_count = shelf_model->item_count(); |
191 int indexes_left = item_index >= 0 ? item_index : item_count; | 191 int indexes_left = item_index >= 0 ? item_index : item_count; |
192 int found_index = -1; | 192 int found_index = -1; |
193 | 193 |
194 // Iterating until we have hit the index we are interested in which | 194 // Iterating until we have hit the index we are interested in which |
(...skipping 16 matching lines...) Expand all Loading... |
211 | 211 |
212 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const { | 212 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const { |
213 return shelf_view_->GetVisibleItemsBoundsInScreen(); | 213 return shelf_view_->GetVisibleItemsBoundsInScreen(); |
214 } | 214 } |
215 | 215 |
216 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { | 216 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { |
217 return shelf_view_; | 217 return shelf_view_; |
218 } | 218 } |
219 | 219 |
220 } // namespace ash | 220 } // namespace ash |
OLD | NEW |