OLD | NEW |
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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 11 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
12 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h" | 12 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h" |
13 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" | 13 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" |
14 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 14 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
15 | 15 |
16 ArcAppDeferredLauncherItemController::ArcAppDeferredLauncherItemController( | 16 ArcAppDeferredLauncherItemController::ArcAppDeferredLauncherItemController( |
17 const std::string& arc_app_id, | 17 const std::string& arc_app_id, |
18 ChromeLauncherController* controller, | 18 ChromeLauncherController* controller, |
19 int event_flags, | 19 int event_flags, |
20 const base::WeakPtr<ArcAppDeferredLauncherController>& host) | 20 const base::WeakPtr<ArcAppDeferredLauncherController>& host) |
21 : LauncherItemController(TYPE_APP, arc_app_id, "", controller), | 21 : LauncherItemController(arc_app_id, "", controller), |
22 event_flags_(event_flags), | 22 event_flags_(event_flags), |
23 host_(host), | 23 host_(host), |
24 start_time_(base::Time::Now()) {} | 24 start_time_(base::Time::Now()) {} |
25 | 25 |
26 ArcAppDeferredLauncherItemController::~ArcAppDeferredLauncherItemController() { | 26 ArcAppDeferredLauncherItemController::~ArcAppDeferredLauncherItemController() { |
27 if (host_) | 27 if (host_) |
28 host_->Remove(app_id()); | 28 host_->Remove(app_id()); |
29 } | 29 } |
30 | 30 |
31 base::TimeDelta ArcAppDeferredLauncherItemController::GetActiveTime() const { | 31 base::TimeDelta ArcAppDeferredLauncherItemController::GetActiveTime() const { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 ash::ShelfItemDelegate::PerformedAction | 83 ash::ShelfItemDelegate::PerformedAction |
84 ArcAppDeferredLauncherItemController::Activate(ash::LaunchSource source) { | 84 ArcAppDeferredLauncherItemController::Activate(ash::LaunchSource source) { |
85 return ash::ShelfItemDelegate::kNoAction; | 85 return ash::ShelfItemDelegate::kNoAction; |
86 } | 86 } |
87 | 87 |
88 ChromeLauncherAppMenuItems | 88 ChromeLauncherAppMenuItems |
89 ArcAppDeferredLauncherItemController::GetApplicationList(int event_flags) { | 89 ArcAppDeferredLauncherItemController::GetApplicationList(int event_flags) { |
90 return ChromeLauncherAppMenuItems(); | 90 return ChromeLauncherAppMenuItems(); |
91 } | 91 } |
OLD | NEW |