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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.cc

Issue 10824030: Move ExtensionHost into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 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
« no previous file with comments | « chrome/browser/ui/webui/extensions/extension_settings_handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/webui/extensions/extension_settings_handler.h" 5 #include "chrome/browser/ui/webui/extensions/extension_settings_handler.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 DCHECK(extension); 564 DCHECK(extension);
565 565
566 Profile* profile = extension_service_->profile(); 566 Profile* profile = extension_service_->profile();
567 if (incognito) 567 if (incognito)
568 profile = profile->GetOffTheRecordProfile(); 568 profile = profile->GetOffTheRecordProfile();
569 569
570 ExtensionProcessManager* pm = profile->GetExtensionProcessManager(); 570 ExtensionProcessManager* pm = profile->GetExtensionProcessManager();
571 extensions::LazyBackgroundTaskQueue* queue = 571 extensions::LazyBackgroundTaskQueue* queue =
572 extensions::ExtensionSystem::Get(profile)->lazy_background_task_queue(); 572 extensions::ExtensionSystem::Get(profile)->lazy_background_task_queue();
573 573
574 ExtensionHost* host = pm->GetBackgroundHostForExtension(extension->id()); 574 extensions::ExtensionHost* host =
575 pm->GetBackgroundHostForExtension(extension->id());
575 if (host) { 576 if (host) {
576 InspectExtensionHost(host); 577 InspectExtensionHost(host);
577 } else { 578 } else {
578 queue->AddPendingTask( 579 queue->AddPendingTask(
579 profile, extension->id(), 580 profile, extension->id(),
580 base::Bind(&ExtensionSettingsHandler::InspectExtensionHost, 581 base::Bind(&ExtensionSettingsHandler::InspectExtensionHost,
581 base::Unretained(this))); 582 base::Unretained(this)));
582 } 583 }
583 584
584 return; 585 return;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 web_ui()->GetWebContents()); 874 web_ui()->GetWebContents());
874 extension_uninstall_dialog_.reset( 875 extension_uninstall_dialog_.reset(
875 ExtensionUninstallDialog::Create(browser, this)); 876 ExtensionUninstallDialog::Create(browser, this));
876 } 877 }
877 return extension_uninstall_dialog_.get(); 878 return extension_uninstall_dialog_.get();
878 #else 879 #else
879 return NULL; 880 return NULL;
880 #endif // !defined(OS_ANDROID) 881 #endif // !defined(OS_ANDROID)
881 } 882 }
882 883
883 void ExtensionSettingsHandler::InspectExtensionHost(ExtensionHost* host) { 884 void ExtensionSettingsHandler::InspectExtensionHost(
885 extensions::ExtensionHost* host) {
884 if (host) 886 if (host)
885 DevToolsWindow::OpenDevToolsWindow(host->render_view_host()); 887 DevToolsWindow::OpenDevToolsWindow(host->render_view_host());
886 } 888 }
OLDNEW
« 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