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

Side by Side Diff: chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.cc

Issue 97173003: ash: Rename more Launcher classes to Shelf*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: link chrome Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h " 5 #include "chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h "
6 6
7 #include "apps/shell_window.h" 7 #include "apps/shell_window.h"
8 #include "apps/ui/native_app_window.h" 8 #include "apps/ui/native_app_window.h"
9 #include "ash/shelf/shelf_model.h" 9 #include "ash/shelf/shelf_model.h"
10 #include "ash/wm/window_state.h" 10 #include "ash/wm/window_state.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 return GetAppTitle(); 222 return GetAppTitle();
223 } 223 }
224 224
225 ui::MenuModel* ShellWindowLauncherItemController::CreateContextMenu( 225 ui::MenuModel* ShellWindowLauncherItemController::CreateContextMenu(
226 aura::Window* root_window) { 226 aura::Window* root_window) {
227 ash::LauncherItem item = 227 ash::LauncherItem item =
228 *(launcher_controller()->model()->ItemByID(launcher_id())); 228 *(launcher_controller()->model()->ItemByID(launcher_id()));
229 return new LauncherContextMenu(launcher_controller(), &item, root_window); 229 return new LauncherContextMenu(launcher_controller(), &item, root_window);
230 } 230 }
231 231
232 ash::LauncherMenuModel* 232 ash::ShelfMenuModel* ShellWindowLauncherItemController::CreateApplicationMenu(
233 ShellWindowLauncherItemController::CreateApplicationMenu(int event_flags) { 233 int event_flags) {
234 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); 234 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags));
235 } 235 }
236 236
237 bool ShellWindowLauncherItemController::IsDraggable() { 237 bool ShellWindowLauncherItemController::IsDraggable() {
238 if (type() == TYPE_APP_PANEL) 238 if (type() == TYPE_APP_PANEL)
239 return true; 239 return true;
240 return launcher_controller()->CanPin() ? true : false; 240 return launcher_controller()->CanPin() ? true : false;
241 } 241 }
242 242
243 bool ShellWindowLauncherItemController::ShouldShowTooltip() { 243 bool ShellWindowLauncherItemController::ShouldShowTooltip() {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 if (window_to_show->GetBaseWindow()->IsActive()) { 286 if (window_to_show->GetBaseWindow()->IsActive()) {
287 // Coming here, only a single window is active. For keyboard activations 287 // Coming here, only a single window is active. For keyboard activations
288 // the window gets animated. 288 // the window gets animated.
289 AnimateWindow(window_to_show->GetNativeWindow(), 289 AnimateWindow(window_to_show->GetNativeWindow(),
290 views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE); 290 views::corewm::WINDOW_ANIMATION_TYPE_BOUNCE);
291 } else { 291 } else {
292 ShowAndActivateOrMinimize(window_to_show); 292 ShowAndActivateOrMinimize(window_to_show);
293 } 293 }
294 } 294 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/shell_window_launcher_item_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698