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

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: 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/app_list/arc/arc_app_utils.h" 5 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 bool landscape_layout) { 207 bool landscape_layout) {
208 const ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context); 208 const ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context);
209 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id); 209 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id);
210 if (app_info && !app_info->ready) { 210 if (app_info && !app_info->ready) {
211 if (!ash::Shell::HasInstance()) 211 if (!ash::Shell::HasInstance())
212 return false; 212 return false;
213 213
214 ChromeLauncherController* chrome_controller = 214 ChromeLauncherController* chrome_controller =
215 ChromeLauncherController::instance(); 215 ChromeLauncherController::instance();
216 DCHECK(chrome_controller); 216 DCHECK(chrome_controller);
217 chrome_controller->arc_deferred_launcher()->RegisterDeferredLaunch(app_id); 217 chrome_controller->GetArcDeferredLauncher()->RegisterDeferredLaunch(app_id);
218 return true; 218 return true;
219 } 219 }
220 220
221 return (new LaunchAppWithoutSize(context, 221 return (new LaunchAppWithoutSize(context,
222 app_id, 222 app_id,
223 landscape_layout))->LaunchAndRelease(); 223 landscape_layout))->LaunchAndRelease();
224 } 224 }
225 225
226 bool CanHandleResolution(content::BrowserContext* context, 226 bool CanHandleResolution(content::BrowserContext* context,
227 const std::string& app_id, 227 const std::string& app_id,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 GetAppInstance(kShowPackageInfoMinVersion, kShowPackageInfoStr); 264 GetAppInstance(kShowPackageInfoMinVersion, kShowPackageInfoStr);
265 if (!app_instance) 265 if (!app_instance)
266 return false; 266 return false;
267 267
268 app_instance->ShowPackageInfo( 268 app_instance->ShowPackageInfo(
269 package_name, GetTargetRect(gfx::Size(kNexus7Width, kNexus7Height))); 269 package_name, GetTargetRect(gfx::Size(kNexus7Width, kNexus7Height)));
270 return true; 270 return true;
271 } 271 }
272 272
273 } // namespace arc 273 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_list_prefs.h ('k') | chrome/browser/ui/ash/app_list/app_list_controller_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698