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

Side by Side Diff: content/shell/shell_browser_main.cc

Issue 8776007: Start/stop WebKitThread from BrowserMainLoop like other BrowserThreads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head. Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host.cc ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/shell/shell_browser_main.h" 5 #include "content/shell/shell_browser_main.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void ShellBrowserMainParts::PostMainMessageLoopRun() { 60 void ShellBrowserMainParts::PostMainMessageLoopRun() {
61 browser_context_.reset(); 61 browser_context_.reset();
62 62
63 resource_dispatcher_host_->download_file_manager()->Shutdown(); 63 resource_dispatcher_host_->download_file_manager()->Shutdown();
64 resource_dispatcher_host_->save_file_manager()->Shutdown(); 64 resource_dispatcher_host_->save_file_manager()->Shutdown();
65 resource_dispatcher_host_->Shutdown(); 65 resource_dispatcher_host_->Shutdown();
66 } 66 }
67 67
68 void ShellBrowserMainParts::PreStopThread(BrowserThread::ID id) { 68 void ShellBrowserMainParts::PreStopThread(BrowserThread::ID id) {
69 if (id == BrowserThread::WEBKIT) { 69 if (id == BrowserThread::WEBKIT) {
70 // It remains the embedder's responsibility to kill the WebKit
71 // thread. This happens when RDH is destroyed.
72 resource_dispatcher_host_.reset(); 70 resource_dispatcher_host_.reset();
73 } 71 }
74 } 72 }
75 73
76 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) { 74 bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
77 return false; 75 return false;
78 } 76 }
79 77
80 ResourceDispatcherHost* ShellBrowserMainParts::GetResourceDispatcherHost() { 78 ResourceDispatcherHost* ShellBrowserMainParts::GetResourceDispatcherHost() {
81 if (!resource_dispatcher_host_.get()) { 79 if (!resource_dispatcher_host_.get()) {
82 ResourceQueue::DelegateSet resource_queue_delegates; 80 ResourceQueue::DelegateSet resource_queue_delegates;
83 resource_dispatcher_host_.reset( 81 resource_dispatcher_host_.reset(
84 new ResourceDispatcherHost(resource_queue_delegates)); 82 new ResourceDispatcherHost(resource_queue_delegates));
85 resource_dispatcher_host_->Initialize(); 83 resource_dispatcher_host_->Initialize();
86 } 84 }
87 return resource_dispatcher_host_.get(); 85 return resource_dispatcher_host_.get();
88 } 86 }
89 87
90 ui::Clipboard* ShellBrowserMainParts::GetClipboard() { 88 ui::Clipboard* ShellBrowserMainParts::GetClipboard() {
91 if (!clipboard_.get()) 89 if (!clipboard_.get())
92 clipboard_.reset(new ui::Clipboard()); 90 clipboard_.reset(new ui::Clipboard());
93 return clipboard_.get(); 91 return clipboard_.get();
94 } 92 }
95 93
96 } // namespace 94 } // namespace
OLDNEW
« no previous file with comments | « content/browser/renderer_host/resource_dispatcher_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698