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

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

Issue 2545923004: Remove LauncherItemController::type; use ShelfItems::type. (Closed)
Patch Set: Update tests; fix test item running status. Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/arc_app_deferred_launcher_item_controll er.h" 5 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controll er.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 9 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
10 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h" 10 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h"
11 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" 11 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h"
12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
13 13
14 ArcAppDeferredLauncherItemController::ArcAppDeferredLauncherItemController( 14 ArcAppDeferredLauncherItemController::ArcAppDeferredLauncherItemController(
15 const std::string& arc_app_id, 15 const std::string& arc_app_id,
16 ChromeLauncherController* controller, 16 ChromeLauncherController* controller,
17 const base::WeakPtr<ArcAppDeferredLauncherController>& host) 17 const base::WeakPtr<ArcAppDeferredLauncherController>& host)
18 : LauncherItemController(TYPE_APP, arc_app_id, "", controller), 18 : LauncherItemController(arc_app_id, "", controller),
19 host_(host), 19 host_(host),
20 start_time_(base::Time::Now()) {} 20 start_time_(base::Time::Now()) {}
21 21
22 ArcAppDeferredLauncherItemController::~ArcAppDeferredLauncherItemController() { 22 ArcAppDeferredLauncherItemController::~ArcAppDeferredLauncherItemController() {
23 if (host_) 23 if (host_)
24 host_->Remove(app_id()); 24 host_->Remove(app_id());
25 } 25 }
26 26
27 base::TimeDelta ArcAppDeferredLauncherItemController::GetActiveTime() const { 27 base::TimeDelta ArcAppDeferredLauncherItemController::GetActiveTime() const {
28 return base::Time::Now() - start_time_; 28 return base::Time::Now() - start_time_;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 ash::ShelfItemDelegate::PerformedAction 79 ash::ShelfItemDelegate::PerformedAction
80 ArcAppDeferredLauncherItemController::Activate(ash::LaunchSource source) { 80 ArcAppDeferredLauncherItemController::Activate(ash::LaunchSource source) {
81 return ash::ShelfItemDelegate::kNoAction; 81 return ash::ShelfItemDelegate::kNoAction;
82 } 82 }
83 83
84 ChromeLauncherAppMenuItems 84 ChromeLauncherAppMenuItems
85 ArcAppDeferredLauncherItemController::GetApplicationList(int event_flags) { 85 ArcAppDeferredLauncherItemController::GetApplicationList(int event_flags) {
86 return ChromeLauncherAppMenuItems(); 86 return ChromeLauncherAppMenuItems();
87 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698