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

Side by Side Diff: chrome/browser/ui/ash/launcher/arc_playstore_shortcut_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: 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
6 #include "chrome/browser/chromeos/arc/arc_support_host.h"
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/app_list/arc/arc_app_launcher.h"
9 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
10 #include "chrome/browser/ui/ash/launcher/arc_playstore_shortcut_launcher_item_co ntroller.h"
11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
12
13 ArcPlaystoreShortcutLauncherItemController::
14 ArcPlaystoreShortcutLauncherItemController(
15 ChromeLauncherController* controller)
16 : AppShortcutLauncherItemController(ArcSupportHost::kHostAppId,
17 controller) {}
18
19 ArcPlaystoreShortcutLauncherItemController::
20 ~ArcPlaystoreShortcutLauncherItemController() {}
21
22 ash::ShelfItemDelegate::PerformedAction
23 ArcPlaystoreShortcutLauncherItemController::Activate(ash::LaunchSource source) {
24 arc::ArcAuthService* auth_service = arc::ArcAuthService::Get();
25 DCHECK(auth_service->IsAllowed());
26
27 if (!auth_service->IsArcEnabled())
28 auth_service->EnableArc();
29
30 // Deferred launcher.
31 playstore_launcher_.reset(
32 new ArcAppLauncher(controller()->profile(), arc::kPlayStoreAppId, true));
33
34 return kNoAction;
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698