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

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

Issue 2052013002: Adding ChromeLauncherController interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome_launcher_smaller_api
Patch Set: Fix method order 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/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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 bool landscape_layout) { 180 bool landscape_layout) {
181 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context); 181 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context);
182 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id); 182 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id);
183 if (app_info && !app_info->ready) { 183 if (app_info && !app_info->ready) {
184 if (!ash::Shell::HasInstance()) 184 if (!ash::Shell::HasInstance())
185 return false; 185 return false;
186 186
187 ChromeLauncherController* chrome_controller = 187 ChromeLauncherController* chrome_controller =
188 ChromeLauncherController::instance(); 188 ChromeLauncherController::instance();
189 DCHECK(chrome_controller); 189 DCHECK(chrome_controller);
190 chrome_controller->arc_deferred_launcher()->RegisterDeferredLaunch(app_id); 190 chrome_controller->GetArcDeferredLauncher()->RegisterDeferredLaunch(app_id);
191 return true; 191 return true;
192 } 192 }
193 193
194 return (new LaunchAppWithoutSize(context, 194 return (new LaunchAppWithoutSize(context,
195 app_id, 195 app_id,
196 landscape_layout))->LaunchAndRelease(); 196 landscape_layout))->LaunchAndRelease();
197 } 197 }
198 198
199 199
200 bool CanHandleResolution(content::BrowserContext* context, 200 bool CanHandleResolution(content::BrowserContext* context,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 if (bridge_service->app_version() < 2) { 256 if (bridge_service->app_version() < 2) {
257 LOG(ERROR) << "Request to uninstall package when version " 257 LOG(ERROR) << "Request to uninstall package when version "
258 << bridge_service->app_version() << " does not support it"; 258 << bridge_service->app_version() << " does not support it";
259 return; 259 return;
260 } 260 }
261 app_instance->UninstallPackage(package_name); 261 app_instance->UninstallPackage(package_name);
262 } 262 }
263 263
264 } // namespace arc 264 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698