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

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

Issue 2052013002: Adding ChromeLauncherController interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome_launcher_smaller_api
Patch Set: Rebase Created 4 years, 6 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
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 <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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // In case of a keyboard event, we were called by a hotkey. In that case we 206 // In case of a keyboard event, we were called by a hotkey. In that case we
207 // activate the next item in line if an item of our list is already active. 207 // activate the next item in line if an item of our list is already active.
208 if (event.type() == ui::ET_KEY_RELEASED) { 208 if (event.type() == ui::ET_KEY_RELEASED) {
209 if (AdvanceToNextApp()) 209 if (AdvanceToNextApp())
210 return kExistingWindowActivated; 210 return kExistingWindowActivated;
211 } 211 }
212 return Activate(ash::LAUNCH_FROM_UNKNOWN); 212 return Activate(ash::LAUNCH_FROM_UNKNOWN);
213 } 213 }
214 214
215 base::string16 AppShortcutLauncherItemController::GetTitle() { 215 base::string16 AppShortcutLauncherItemController::GetTitle() {
216 return LauncherControllerHelper::GetAppTitle(launcher_controller()->profile(), 216 return LauncherControllerHelper::GetAppTitle(
217 app_id()); 217 launcher_controller()->GetProfile(), app_id());
218 } 218 }
219 219
220 ash::ShelfMenuModel* AppShortcutLauncherItemController::CreateApplicationMenu( 220 ash::ShelfMenuModel* AppShortcutLauncherItemController::CreateApplicationMenu(
221 int event_flags) { 221 int event_flags) {
222 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags)); 222 return new LauncherApplicationMenuItemModel(GetApplicationList(event_flags));
223 } 223 }
224 224
225 bool AppShortcutLauncherItemController::IsDraggable() { 225 bool AppShortcutLauncherItemController::IsDraggable() {
226 return CanPin(); 226 return CanPin();
227 } 227 }
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 374
375 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() { 375 bool AppShortcutLauncherItemController::AllowNextLaunchAttempt() {
376 if (last_launch_attempt_.is_null() || 376 if (last_launch_attempt_.is_null() ||
377 last_launch_attempt_ + base::TimeDelta::FromMilliseconds( 377 last_launch_attempt_ + base::TimeDelta::FromMilliseconds(
378 kClickSuppressionInMS) < base::Time::Now()) { 378 kClickSuppressionInMS) < base::Time::Now()) {
379 last_launch_attempt_ = base::Time::Now(); 379 last_launch_attempt_ = base::Time::Now();
380 return true; 380 return true;
381 } 381 }
382 return false; 382 return false;
383 } 383 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.cc ('k') | chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698