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