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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 return; | 200 return; |
201 } | 201 } |
202 Activate(ash::LAUNCH_FROM_UNKNOWN); | 202 Activate(ash::LAUNCH_FROM_UNKNOWN); |
203 } | 203 } |
204 | 204 |
205 base::string16 AppShortcutLauncherItemController::GetTitle() { | 205 base::string16 AppShortcutLauncherItemController::GetTitle() { |
206 return GetAppTitle(); | 206 return GetAppTitle(); |
207 } | 207 } |
208 | 208 |
209 ui::MenuModel* AppShortcutLauncherItemController::CreateContextMenu( | 209 ui::MenuModel* AppShortcutLauncherItemController::CreateContextMenu( |
210 aura::RootWindow* root_window) { | 210 aura::Window* root_window) { |
211 ash::LauncherItem item = | 211 ash::LauncherItem item = |
212 *(launcher_controller()->model()->ItemByID(launcher_id())); | 212 *(launcher_controller()->model()->ItemByID(launcher_id())); |
213 return new LauncherContextMenu(launcher_controller(), &item, root_window); | 213 return new LauncherContextMenu(launcher_controller(), &item, root_window); |
214 } | 214 } |
215 | 215 |
216 ash::LauncherMenuModel* | 216 ash::LauncherMenuModel* |
217 AppShortcutLauncherItemController::CreateApplicationMenu(int event_flags) { | 217 AppShortcutLauncherItemController::CreateApplicationMenu(int event_flags) { |
218 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); | 218 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); |
219 } | 219 } |
220 | 220 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 | 343 |
344 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { | 344 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { |
345 if (last_launch_attempt_.is_null() || | 345 if (last_launch_attempt_.is_null() || |
346 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( | 346 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( |
347 kClickSuppressionInMS) < base::Time::Now()) { | 347 kClickSuppressionInMS) < base::Time::Now()) { |
348 last_launch_attempt_ = base::Time::Now(); | 348 last_launch_attempt_ = base::Time::Now(); |
349 return true; | 349 return true; |
350 } | 350 } |
351 return false; | 351 return false; |
352 } | 352 } |
OLD | NEW |