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

Side by Side Diff: chrome/browser/ui/app_list/arc/arc_app_utils.cc

Issue 1973603002: arc: Make Play Store item persistance in shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: prevent showing playstore icon on non-arc devices 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/app_list/arc/arc_app_utils.h" 5 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" 10 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 result.set_x((work_area.width() - result.width()) / 2); 102 result.set_x((work_area.width() - result.width()) / 2);
103 result.set_y((work_area.height() - result.height()) / 2); 103 result.set_y((work_area.height() - result.height()) / 2);
104 return result; 104 return result;
105 } 105 }
106 106
107 DISALLOW_COPY_AND_ASSIGN(LaunchAppWithoutSize); 107 DISALLOW_COPY_AND_ASSIGN(LaunchAppWithoutSize);
108 }; 108 };
109 109
110 } // namespace 110 } // namespace
111 111
112 const char kPlayStoreAppId[] = "gpkmicpkkebkmabiaedjognfppcchdfa";
113
112 bool LaunchAppWithRect(content::BrowserContext* context, 114 bool LaunchAppWithRect(content::BrowserContext* context,
113 const std::string& app_id, 115 const std::string& app_id,
114 const gfx::Rect& target_rect) { 116 const gfx::Rect& target_rect) {
115 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context); 117 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context);
116 CHECK(prefs); 118 CHECK(prefs);
117 119
118 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id); 120 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id);
119 if (!app_info) { 121 if (!app_info) {
120 VLOG(2) << "Cannot launch unavailable app: " << app_id << "."; 122 VLOG(2) << "Cannot launch unavailable app: " << app_id << ".";
121 return false; 123 return false;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 223
222 if (bridge_service->app_version() < 2) { 224 if (bridge_service->app_version() < 2) {
223 LOG(ERROR) << "Request to uninstall package when version " 225 LOG(ERROR) << "Request to uninstall package when version "
224 << bridge_service->app_version() << " does not support it"; 226 << bridge_service->app_version() << " does not support it";
225 return; 227 return;
226 } 228 }
227 app_instance->UninstallPackage(package_name); 229 app_instance->UninstallPackage(package_name);
228 } 230 }
229 231
230 } // namespace arc 232 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698