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

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: Created 8 years, 5 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 (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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 DCHECK(extension); 562 DCHECK(extension);
563 563
564 Profile* profile = extension_service_->profile(); 564 Profile* profile = extension_service_->profile();
565 if (incognito) 565 if (incognito)
566 profile = profile->GetOffTheRecordProfile(); 566 profile = profile->GetOffTheRecordProfile();
567 567
568 ExtensionProcessManager* pm = profile->GetExtensionProcessManager(); 568 ExtensionProcessManager* pm = profile->GetExtensionProcessManager();
569 extensions::LazyBackgroundTaskQueue* queue = 569 extensions::LazyBackgroundTaskQueue* queue =
570 extensions::ExtensionSystem::Get(profile)->lazy_background_task_queue(); 570 extensions::ExtensionSystem::Get(profile)->lazy_background_task_queue();
571 571
572 ExtensionHost* host = pm->GetBackgroundHostForExtension(extension->id()); 572 extensions::ExtensionHost* host =
573 pm->GetBackgroundHostForExtension(extension->id());
573 if (host) { 574 if (host) {
574 InspectExtensionHost(host); 575 InspectExtensionHost(host);
575 } else { 576 } else {
576 queue->AddPendingTask( 577 queue->AddPendingTask(
577 profile, extension->id(), 578 profile, extension->id(),
578 base::Bind(&ExtensionSettingsHandler::InspectExtensionHost, 579 base::Bind(&ExtensionSettingsHandler::InspectExtensionHost,
579 base::Unretained(this))); 580 base::Unretained(this)));
580 } 581 }
581 582
582 return; 583 return;
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 web_ui()->GetWebContents()); 871 web_ui()->GetWebContents());
871 extension_uninstall_dialog_.reset( 872 extension_uninstall_dialog_.reset(
872 ExtensionUninstallDialog::Create(browser, this)); 873 ExtensionUninstallDialog::Create(browser, this));
873 } 874 }
874 return extension_uninstall_dialog_.get(); 875 return extension_uninstall_dialog_.get();
875 #else 876 #else
876 return NULL; 877 return NULL;
877 #endif // !defined(OS_ANDROID) 878 #endif // !defined(OS_ANDROID)
878 } 879 }
879 880
880 void ExtensionSettingsHandler::InspectExtensionHost(ExtensionHost* host) { 881 void ExtensionSettingsHandler::InspectExtensionHost(
882 extensions::ExtensionHost* host) {
881 if (host) 883 if (host)
882 DevToolsWindow::OpenDevToolsWindow(host->render_view_host()); 884 DevToolsWindow::OpenDevToolsWindow(host->render_view_host());
883 } 885 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698