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

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

Issue 1973603002: arc: Make Play Store item persistance in shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + policy_browsertest.cc Created 4 years, 7 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_window_launcher_item_controller .h" 5 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller .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/chrome_launcher_app_menu_item_v2app.h" 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h"
11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
12 12
13 ArcAppWindowLauncherItemController::ArcAppWindowLauncherItemController( 13 ArcAppWindowLauncherItemController::ArcAppWindowLauncherItemController(
14 const std::string& app_id, 14 const std::string& shelf_app_id,
15 const std::string& arc_app_id,
15 ChromeLauncherController* controller) 16 ChromeLauncherController* controller)
16 : AppWindowLauncherItemController(TYPE_APP, app_id, app_id, controller) {} 17 : AppWindowLauncherItemController(TYPE_APP,
18 shelf_app_id,
19 arc_app_id,
20 controller) {}
17 21
18 ArcAppWindowLauncherItemController::~ArcAppWindowLauncherItemController() {} 22 ArcAppWindowLauncherItemController::~ArcAppWindowLauncherItemController() {}
19 23
20 base::string16 ArcAppWindowLauncherItemController::GetTitle() { 24 base::string16 ArcAppWindowLauncherItemController::GetTitle() {
21 ArcAppListPrefs* arc_prefs = 25 ArcAppListPrefs* arc_prefs =
22 ArcAppListPrefs::Get(launcher_controller()->profile()); 26 ArcAppListPrefs::Get(launcher_controller()->profile());
23 DCHECK(arc_prefs); 27 DCHECK(arc_prefs);
24 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = 28 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info =
25 arc_prefs->GetApp(app_id()); 29 arc_prefs->GetApp(app_id());
26 if (!app_info) { 30 if (!app_info) {
(...skipping 15 matching lines...) Expand all
42 AppWindowLauncherItemController::GetApplicationList(event_flags); 46 AppWindowLauncherItemController::GetApplicationList(event_flags);
43 for (size_t i = 0; i < windows().size(); ++i) { 47 for (size_t i = 0; i < windows().size(); ++i) {
44 // TODO(khmel): resolve correct icon here. 48 // TODO(khmel): resolve correct icon here.
45 gfx::Image image; 49 gfx::Image image;
46 items.push_back(new ChromeLauncherAppMenuItemV2App( 50 items.push_back(new ChromeLauncherAppMenuItemV2App(
47 GetTitle(), &image, app_id(), launcher_controller(), i, 51 GetTitle(), &image, app_id(), launcher_controller(), i,
48 i == 0 /* has_leading_separator */)); 52 i == 0 /* has_leading_separator */));
49 } 53 }
50 return items; 54 return items;
51 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698