Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: ash/shelf/shelf.cc

Issue 2267183002: ash: Remove unnecessary utility methods from ash::Shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf.h ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/shelf/shelf.h ('k') | ash/shelf/shelf_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698