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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "chrome/browser/chromeos/arc/arc_support_host.h" | 10 #include "chrome/browser/chromeos/arc/arc_support_host.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 bool AppShortcutLauncherItemController::IsDraggable() { | 223 bool AppShortcutLauncherItemController::IsDraggable() { |
224 return true; | 224 return true; |
225 } | 225 } |
226 | 226 |
227 bool AppShortcutLauncherItemController::CanPin() const { | 227 bool AppShortcutLauncherItemController::CanPin() const { |
228 return GetPinnableForAppID(app_id(), launcher_controller()->profile()) == | 228 return GetPinnableForAppID(app_id(), launcher_controller()->profile()) == |
229 AppListControllerDelegate::PIN_EDITABLE; | 229 AppListControllerDelegate::PIN_EDITABLE; |
230 } | 230 } |
231 | 231 |
232 bool AppShortcutLauncherItemController::ShouldShowTooltip() { | |
233 return true; | |
234 } | |
235 | |
236 content::WebContents* AppShortcutLauncherItemController::GetLRUApplication() { | 232 content::WebContents* AppShortcutLauncherItemController::GetLRUApplication() { |
237 URLPattern refocus_pattern(URLPattern::SCHEME_ALL); | 233 URLPattern refocus_pattern(URLPattern::SCHEME_ALL); |
238 refocus_pattern.SetMatchAllURLs(true); | 234 refocus_pattern.SetMatchAllURLs(true); |
239 | 235 |
240 if (!refocus_url_.is_empty()) { | 236 if (!refocus_url_.is_empty()) { |
241 refocus_pattern.SetMatchAllURLs(false); | 237 refocus_pattern.SetMatchAllURLs(false); |
242 refocus_pattern.Parse(refocus_url_.spec()); | 238 refocus_pattern.Parse(refocus_url_.spec()); |
243 } | 239 } |
244 | 240 |
245 const Extension* extension = | 241 const Extension* extension = |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 368 |
373 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { | 369 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { |
374 if (last_launch_attempt_.is_null() || | 370 if (last_launch_attempt_.is_null() || |
375 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( | 371 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( |
376 kClickSuppressionInMS) < base::Time::Now()) { | 372 kClickSuppressionInMS) < base::Time::Now()) { |
377 last_launch_attempt_ = base::Time::Now(); | 373 last_launch_attempt_ = base::Time::Now(); |
378 return true; | 374 return true; |
379 } | 375 } |
380 return false; | 376 return false; |
381 } | 377 } |
OLD | NEW |