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

Side by Side Diff: chrome/browser/extensions/devtools_util.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
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 "chrome/browser/extensions/devtools_util.h" 5 #include "chrome/browser/extensions/devtools_util.h"
6 6
7 #include "chrome/browser/devtools/devtools_window.h" 7 #include "chrome/browser/devtools/devtools_window.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "extensions/browser/extension_host.h" 9 #include "extensions/browser/extension_host.h"
10 #include "extensions/browser/extension_system.h" 10 #include "extensions/browser/extension_system.h"
(...skipping 10 matching lines...) Expand all
21 void InspectExtensionHost(ExtensionHost* host) { 21 void InspectExtensionHost(ExtensionHost* host) {
22 if (host) 22 if (host)
23 DevToolsWindow::OpenDevToolsWindow(host->host_contents()); 23 DevToolsWindow::OpenDevToolsWindow(host->host_contents());
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 void InspectBackgroundPage(const Extension* extension, Profile* profile) { 28 void InspectBackgroundPage(const Extension* extension, Profile* profile) {
29 DCHECK(extension); 29 DCHECK(extension);
30 ExtensionSystem* system = ExtensionSystem::Get(profile); 30 ExtensionSystem* system = ExtensionSystem::Get(profile);
31 ExtensionHost* host = 31 ExtensionHost* host = ProcessManager::Get(profile)
32 system->process_manager()->GetBackgroundHostForExtension(extension->id()); 32 ->GetBackgroundHostForExtension(extension->id());
33 if (host) { 33 if (host) {
34 InspectExtensionHost(host); 34 InspectExtensionHost(host);
35 } else { 35 } else {
36 system->lazy_background_task_queue()->AddPendingTask( 36 system->lazy_background_task_queue()->AddPendingTask(
37 profile, 37 profile,
38 extension->id(), 38 extension->id(),
39 base::Bind(&InspectExtensionHost)); 39 base::Bind(&InspectExtensionHost));
40 } 40 }
41 } 41 }
42 42
43 } // namespace devtools_util 43 } // namespace devtools_util
44 } // namespace extensions 44 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/chrome_process_manager_delegate.cc ('k') | chrome/browser/extensions/extension_bindings_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698