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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
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/app_shortcut_launcher_item_controller.h " 5 #include "chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h "
6 6
7 #include "apps/ui/native_app_window.h" 7 #include "apps/ui/native_app_window.h"
8 #include "ash/launcher/launcher_model.h" 8 #include "ash/launcher/launcher_model.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return; 202 return;
203 } 203 }
204 Activate(ash::LAUNCH_FROM_UNKNOWN); 204 Activate(ash::LAUNCH_FROM_UNKNOWN);
205 } 205 }
206 206
207 base::string16 AppShortcutLauncherItemController::GetTitle() { 207 base::string16 AppShortcutLauncherItemController::GetTitle() {
208 return GetAppTitle(); 208 return GetAppTitle();
209 } 209 }
210 210
211 ui::MenuModel* AppShortcutLauncherItemController::CreateContextMenu( 211 ui::MenuModel* AppShortcutLauncherItemController::CreateContextMenu(
212 aura::RootWindow* root_window) { 212 aura::Window* root_window) {
213 ash::LauncherItem item = 213 ash::LauncherItem item =
214 *(launcher_controller()->model()->ItemByID(launcher_id())); 214 *(launcher_controller()->model()->ItemByID(launcher_id()));
215 return new LauncherContextMenu(launcher_controller(), &item, root_window); 215 return new LauncherContextMenu(launcher_controller(), &item, root_window);
216 } 216 }
217 217
218 ash::LauncherMenuModel* 218 ash::LauncherMenuModel*
219 AppShortcutLauncherItemController::CreateApplicationMenu(int event_flags) { 219 AppShortcutLauncherItemController::CreateApplicationMenu(int event_flags) {
220 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); 220 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags));
221 } 221 }
222 222
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 349
350 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { 350 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() {
351 if (last_launch_attempt_.is_null() || 351 if (last_launch_attempt_.is_null() ||
352 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( 352 last_launch_attempt_ + base::TimeDelta::FromMilliseconds(
353 kClickSuppressionInMS) < base::Time::Now()) { 353 kClickSuppressionInMS) < base::Time::Now()) {
354 last_launch_attempt_ = base::Time::Now(); 354 last_launch_attempt_ = base::Time::Now();
355 return true; 355 return true;
356 } 356 }
357 return false; 357 return false;
358 } 358 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698