summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_browser_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/shell/shell_browser_main.cc')
-rw-r--r--content/shell/shell_browser_main.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/content/shell/shell_browser_main.cc b/content/shell/shell_browser_main.cc
index 311b6a0..24d7149 100644
--- a/content/shell/shell_browser_main.cc
+++ b/content/shell/shell_browser_main.cc
@@ -13,6 +13,7 @@
#include "content/browser/download/download_file_manager.h"
#include "content/browser/download/save_file_manager.h"
#include "content/browser/plugin_service_impl.h"
+#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/shell/shell.h"
#include "content/shell/shell_browser_context.h"
#include "content/shell/shell_content_browser_client.h"
@@ -47,6 +48,7 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
Shell::PlatformInitialize();
net::NetModule::SetResourceProvider(Shell::PlatformResourceProvider);
+ PluginService::GetInstance()->Init();
Shell::CreateNewWindow(browser_context_.get(),
GetStartupURL(),
@@ -57,12 +59,32 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
void ShellBrowserMainParts::PostMainMessageLoopRun() {
browser_context_.reset();
+
+ resource_dispatcher_host_->download_file_manager()->Shutdown();
+ resource_dispatcher_host_->save_file_manager()->Shutdown();
+ resource_dispatcher_host_->Shutdown();
+}
+
+void ShellBrowserMainParts::PreStopThread(BrowserThread::ID id) {
+ if (id == BrowserThread::WEBKIT_DEPRECATED) {
+ resource_dispatcher_host_.reset();
+ }
}
bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
return false;
}
+ResourceDispatcherHost* ShellBrowserMainParts::GetResourceDispatcherHost() {
+ if (!resource_dispatcher_host_.get()) {
+ ResourceQueue::DelegateSet resource_queue_delegates;
+ resource_dispatcher_host_.reset(
+ new ResourceDispatcherHost(resource_queue_delegates));
+ resource_dispatcher_host_->Initialize();
+ }
+ return resource_dispatcher_host_.get();
+}
+
ui::Clipboard* ShellBrowserMainParts::GetClipboard() {
if (!clipboard_.get())
clipboard_.reset(new ui::Clipboard());