| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 item_delegate->ItemSelected(event); | 129 item_delegate->ItemSelected(event); |
| 130 } | 130 } |
| 131 | 131 |
| 132 void Shelf::CycleWindowLinear(CycleDirection direction) { | 132 void Shelf::CycleWindowLinear(CycleDirection direction) { |
| 133 int item_index = | 133 int item_index = |
| 134 GetNextActivatedItemIndex(*WmShell::Get()->shelf_model(), direction); | 134 GetNextActivatedItemIndex(*WmShell::Get()->shelf_model(), direction); |
| 135 if (item_index >= 0) | 135 if (item_index >= 0) |
| 136 ActivateShelfItem(item_index); | 136 ActivateShelfItem(item_index); |
| 137 } | 137 } |
| 138 | 138 |
| 139 bool Shelf::IsShowingMenu() const { | |
| 140 return shelf_view_->IsShowingMenu(); | |
| 141 } | |
| 142 | |
| 143 bool Shelf::IsShowingOverflowBubble() const { | |
| 144 return shelf_view_->IsShowingOverflowBubble(); | |
| 145 } | |
| 146 | |
| 147 bool Shelf::IsVisible() const { | |
| 148 return shelf_view_->visible(); | |
| 149 } | |
| 150 | |
| 151 AppListButton* Shelf::GetAppListButton() const { | 139 AppListButton* Shelf::GetAppListButton() const { |
| 152 return shelf_view_->GetAppListButton(); | 140 return shelf_view_->GetAppListButton(); |
| 153 } | 141 } |
| 154 | 142 |
| 155 void Shelf::LaunchAppIndexAt(int item_index) { | 143 void Shelf::LaunchAppIndexAt(int item_index) { |
| 156 ShelfModel* shelf_model = WmShell::Get()->shelf_model(); | 144 ShelfModel* shelf_model = WmShell::Get()->shelf_model(); |
| 157 const ShelfItems& items = shelf_model->items(); | 145 const ShelfItems& items = shelf_model->items(); |
| 158 int item_count = shelf_model->item_count(); | 146 int item_count = shelf_model->item_count(); |
| 159 int indexes_left = item_index >= 0 ? item_index : item_count; | 147 int indexes_left = item_index >= 0 ? item_index : item_count; |
| 160 int found_index = -1; | 148 int found_index = -1; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 183 | 171 |
| 184 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { | 172 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { |
| 185 return shelf_view_; | 173 return shelf_view_; |
| 186 } | 174 } |
| 187 | 175 |
| 188 void Shelf::UpdateShelfItemBackground(int alpha) { | 176 void Shelf::UpdateShelfItemBackground(int alpha) { |
| 189 shelf_view_->UpdateShelfItemBackground(alpha); | 177 shelf_view_->UpdateShelfItemBackground(alpha); |
| 190 } | 178 } |
| 191 | 179 |
| 192 } // namespace ash | 180 } // namespace ash |
| OLD | NEW |