OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |