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

Unified Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 10907243: Add "inspect background page" to platform app right-click menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment in test Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_settings_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/extensions/extension_settings_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index ed1a98f3a6b90098b2ed9e4311b51d63ae0ecd2a..2b9123a66c919b38f5b5386b9620646bf5fe1298 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -566,25 +566,12 @@ void ExtensionSettingsHandler::HandleInspectMessage(const ListValue* args) {
extension_service_->extensions()->GetByID(extension_id);
DCHECK(extension);
- Profile* profile = extension_service_->profile();
+ ExtensionService* service = extension_service_;
if (incognito)
- profile = profile->GetOffTheRecordProfile();
-
- ExtensionProcessManager* pm = profile->GetExtensionProcessManager();
- extensions::LazyBackgroundTaskQueue* queue =
- extensions::ExtensionSystem::Get(profile)->lazy_background_task_queue();
-
- extensions::ExtensionHost* host =
- pm->GetBackgroundHostForExtension(extension->id());
- if (host) {
- InspectExtensionHost(host);
- } else {
- queue->AddPendingTask(
- profile, extension->id(),
- base::Bind(&ExtensionSettingsHandler::InspectExtensionHost,
- base::Unretained(this)));
- }
+ service = extensions::ExtensionSystem::Get(extension_service_->
+ profile()->GetOffTheRecordProfile())->extension_service();
+ service->InspectBackgroundPage(extension);
return;
}
@@ -896,12 +883,6 @@ ExtensionSettingsHandler::GetExtensionUninstallDialog() {
#endif // !defined(OS_ANDROID)
}
-void ExtensionSettingsHandler::InspectExtensionHost(
- extensions::ExtensionHost* host) {
- if (host)
- DevToolsWindow::OpenDevToolsWindow(host->render_view_host());
-}
-
void ExtensionSettingsHandler::OnRequirementsChecked(
std::string extension_id,
std::vector<std::string> requirement_errors) {
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_settings_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698