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

Side by Side Diff: chrome/browser/ui/ash/launcher/arc_app_deferred_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 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"
(...skipping 16 matching lines...) Expand all
27 return base::Time::Now() - start_time_; 27 return base::Time::Now() - start_time_;
28 } 28 }
29 29
30 ash::ShelfItemDelegate::PerformedAction 30 ash::ShelfItemDelegate::PerformedAction
31 ArcAppDeferredLauncherItemController::ItemSelected(const ui::Event& event) { 31 ArcAppDeferredLauncherItemController::ItemSelected(const ui::Event& event) {
32 return ash::ShelfItemDelegate::kNoAction; 32 return ash::ShelfItemDelegate::kNoAction;
33 } 33 }
34 34
35 base::string16 ArcAppDeferredLauncherItemController::GetTitle() { 35 base::string16 ArcAppDeferredLauncherItemController::GetTitle() {
36 ArcAppListPrefs* arc_prefs = 36 ArcAppListPrefs* arc_prefs =
37 ArcAppListPrefs::Get(launcher_controller()->profile()); 37 ArcAppListPrefs::Get(launcher_controller()->GetProfile());
38 DCHECK(arc_prefs); 38 DCHECK(arc_prefs);
39 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = 39 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info =
40 arc_prefs->GetApp(app_id()); 40 arc_prefs->GetApp(app_id());
41 if (!app_info) { 41 if (!app_info) {
42 NOTREACHED(); 42 NOTREACHED();
43 return base::string16(); 43 return base::string16();
44 } 44 }
45 45
46 return base::UTF8ToUTF16(app_info->name); 46 return base::UTF8ToUTF16(app_info->name);
47 } 47 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 ash::ShelfItemDelegate::PerformedAction 82 ash::ShelfItemDelegate::PerformedAction
83 ArcAppDeferredLauncherItemController::Activate(ash::LaunchSource source) { 83 ArcAppDeferredLauncherItemController::Activate(ash::LaunchSource source) {
84 return ash::ShelfItemDelegate::kNoAction; 84 return ash::ShelfItemDelegate::kNoAction;
85 } 85 }
86 86
87 ChromeLauncherAppMenuItems 87 ChromeLauncherAppMenuItems
88 ArcAppDeferredLauncherItemController::GetApplicationList(int event_flags) { 88 ArcAppDeferredLauncherItemController::GetApplicationList(int event_flags) {
89 return ChromeLauncherAppMenuItems(); 89 return ChromeLauncherAppMenuItems();
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698