| 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/shelf/shelf_model.h" | 8 #include "ash/shelf/shelf_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 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/ui/host_desktop.h" | 24 #include "chrome/browser/ui/host_desktop.h" |
| 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 26 #include "chrome/browser/web_applications/web_app.h" | 26 #include "chrome/browser/web_applications/web_app.h" |
| 27 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 27 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
| 28 #include "content/public/browser/navigation_entry.h" | 28 #include "content/public/browser/navigation_entry.h" |
| 29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 30 #include "extensions/browser/extension_system.h" | 30 #include "extensions/browser/extension_system.h" |
| 31 #include "extensions/browser/process_manager.h" | 31 #include "extensions/browser/process_manager.h" |
| 32 #include "ui/aura/window.h" | 32 #include "ui/aura/window.h" |
| 33 #include "ui/events/event.h" | 33 #include "ui/events/event.h" |
| 34 #include "ui/views/corewm/window_animations.h" | 34 #include "ui/wm/core/window_animations.h" |
| 35 | 35 |
| 36 using extensions::Extension; | 36 using extensions::Extension; |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| 39 | 39 |
| 40 // The time delta between clicks in which clicks to launch V2 apps are ignored. | 40 // The time delta between clicks in which clicks to launch V2 apps are ignored. |
| 41 const int kClickSuppressionInMS = 1000; | 41 const int kClickSuppressionInMS = 1000; |
| 42 | 42 |
| 43 // Check if a browser can be used for activation. This addresses a special use | 43 // Check if a browser can be used for activation. This addresses a special use |
| 44 // case in the M31 multi profile mode where a user activates a V1 app which only | 44 // case in the M31 multi profile mode where a user activates a V1 app which only |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 362 |
| 363 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { | 363 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { |
| 364 if (last_launch_attempt_.is_null() || | 364 if (last_launch_attempt_.is_null() || |
| 365 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( | 365 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( |
| 366 kClickSuppressionInMS) < base::Time::Now()) { | 366 kClickSuppressionInMS) < base::Time::Now()) { |
| 367 last_launch_attempt_ = base::Time::Now(); | 367 last_launch_attempt_ = base::Time::Now(); |
| 368 return true; | 368 return true; |
| 369 } | 369 } |
| 370 return false; | 370 return false; |
| 371 } | 371 } |
| OLD | NEW |