| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool Shelf::IsShowingOverflowBubble() const { | 143 bool Shelf::IsShowingOverflowBubble() const { |
| 144 return shelf_view_->IsShowingOverflowBubble(); | 144 return shelf_view_->IsShowingOverflowBubble(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 bool Shelf::IsVisible() const { | 147 bool Shelf::IsVisible() const { |
| 148 return shelf_view_->visible(); | 148 return shelf_view_->visible(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void Shelf::SchedulePaint() { | |
| 152 shelf_view_->SchedulePaintForAllButtons(); | |
| 153 } | |
| 154 | |
| 155 AppListButton* Shelf::GetAppListButton() const { | 151 AppListButton* Shelf::GetAppListButton() const { |
| 156 return shelf_view_->GetAppListButton(); | 152 return shelf_view_->GetAppListButton(); |
| 157 } | 153 } |
| 158 | 154 |
| 159 void Shelf::LaunchAppIndexAt(int item_index) { | 155 void Shelf::LaunchAppIndexAt(int item_index) { |
| 160 ShelfModel* shelf_model = WmShell::Get()->shelf_model(); | 156 ShelfModel* shelf_model = WmShell::Get()->shelf_model(); |
| 161 const ShelfItems& items = shelf_model->items(); | 157 const ShelfItems& items = shelf_model->items(); |
| 162 int item_count = shelf_model->item_count(); | 158 int item_count = shelf_model->item_count(); |
| 163 int indexes_left = item_index >= 0 ? item_index : item_count; | 159 int indexes_left = item_index >= 0 ? item_index : item_count; |
| 164 int found_index = -1; | 160 int found_index = -1; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 187 | 183 |
| 188 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { | 184 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { |
| 189 return shelf_view_; | 185 return shelf_view_; |
| 190 } | 186 } |
| 191 | 187 |
| 192 void Shelf::UpdateShelfItemBackground(int alpha) { | 188 void Shelf::UpdateShelfItemBackground(int alpha) { |
| 193 shelf_view_->UpdateShelfItemBackground(alpha); | 189 shelf_view_->UpdateShelfItemBackground(alpha); |
| 194 } | 190 } |
| 195 | 191 |
| 196 } // namespace ash | 192 } // namespace ash |
| OLD | NEW |