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

Side by Side Diff: apps/launcher.cc

Issue 671763002: Extract ProcessManager from ExtensionSystem. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/apps/ephemeral_app_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/launcher.h" 5 #include "apps/launcher.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 if (queue->ShouldEnqueueTask(profile_, extension_)) { 256 if (queue->ShouldEnqueueTask(profile_, extension_)) {
257 queue->AddPendingTask( 257 queue->AddPendingTask(
258 profile_, 258 profile_,
259 extension_->id(), 259 extension_->id(),
260 base::Bind(&PlatformAppPathLauncher::GrantAccessToFilesAndLaunch, 260 base::Bind(&PlatformAppPathLauncher::GrantAccessToFilesAndLaunch,
261 this)); 261 this));
262 return; 262 return;
263 } 263 }
264 264
265 extensions::ProcessManager* const process_manager = 265 extensions::ProcessManager* const process_manager =
266 ExtensionSystem::Get(profile_)->process_manager(); 266 extensions::ProcessManager::Get(profile_);
267 ExtensionHost* const host = 267 ExtensionHost* const host =
268 process_manager->GetBackgroundHostForExtension(extension_->id()); 268 process_manager->GetBackgroundHostForExtension(extension_->id());
269 DCHECK(host); 269 DCHECK(host);
270 GrantAccessToFilesAndLaunch(host); 270 GrantAccessToFilesAndLaunch(host);
271 } 271 }
272 272
273 void GrantAccessToFilesAndLaunch(ExtensionHost* host) { 273 void GrantAccessToFilesAndLaunch(ExtensionHost* host) {
274 // If there was an error loading the app page, |host| will be NULL. 274 // If there was an error loading the app page, |host| will be NULL.
275 if (!host) { 275 if (!host) {
276 LOG(ERROR) << "Could not load app page for " << extension_->id(); 276 LOG(ERROR) << "Could not load app page for " << extension_->id();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 void LaunchPlatformAppWithUrl(Profile* profile, 405 void LaunchPlatformAppWithUrl(Profile* profile,
406 const Extension* extension, 406 const Extension* extension,
407 const std::string& handler_id, 407 const std::string& handler_id,
408 const GURL& url, 408 const GURL& url,
409 const GURL& referrer_url) { 409 const GURL& referrer_url) {
410 AppRuntimeEventRouter::DispatchOnLaunchedEventWithUrl( 410 AppRuntimeEventRouter::DispatchOnLaunchedEventWithUrl(
411 profile, extension, handler_id, url, referrer_url); 411 profile, extension, handler_id, url, referrer_url);
412 } 412 }
413 413
414 } // namespace apps 414 } // namespace apps
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/apps/ephemeral_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698