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

Side by Side Diff: chrome/renderer/render_thread.cc

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 | « chrome/renderer/render_thread.h ('k') | chrome/renderer/render_view.h » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 #include <algorithm> 6 #include <algorithm>
7 7
8 #include "chrome/renderer/render_thread.h" 8 #include "chrome/renderer/render_thread.h"
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 delete visited_link_slave_; 142 delete visited_link_slave_;
143 visited_link_slave_ = NULL; 143 visited_link_slave_ = NULL;
144 144
145 delete greasemonkey_slave_; 145 delete greasemonkey_slave_;
146 greasemonkey_slave_ = NULL; 146 greasemonkey_slave_ = NULL;
147 147
148 CoUninitialize(); 148 CoUninitialize();
149 } 149 }
150 150
151 void RenderThread::OnUpdateVisitedLinks(SharedMemoryHandle table) { 151 void RenderThread::OnUpdateVisitedLinks(base::SharedMemoryHandle table) {
152 DCHECK(table) << "Bad table handle"; 152 DCHECK(table) << "Bad table handle";
153 visited_link_slave_->Init(table); 153 visited_link_slave_->Init(table);
154 } 154 }
155 155
156 void RenderThread::OnUpdateGreasemonkeyScripts(SharedMemoryHandle scripts) { 156 void RenderThread::OnUpdateGreasemonkeyScripts(
157 base::SharedMemoryHandle scripts) {
157 DCHECK(scripts) << "Bad scripts handle"; 158 DCHECK(scripts) << "Bad scripts handle";
158 greasemonkey_slave_->UpdateScripts(scripts); 159 greasemonkey_slave_->UpdateScripts(scripts);
159 } 160 }
160 161
161 void RenderThread::OnMessageReceived(const IPC::Message& msg) { 162 void RenderThread::OnMessageReceived(const IPC::Message& msg) {
162 // NOTE: We could subclass router_ to intercept OnControlMessageReceived, but 163 // NOTE: We could subclass router_ to intercept OnControlMessageReceived, but
163 // it seems simpler to just process any control messages that we care about 164 // it seems simpler to just process any control messages that we care about
164 // up-front and then send the rest of the messages onto router_. 165 // up-front and then send the rest of the messages onto router_.
165 166
166 if (msg.routing_id() == MSG_ROUTING_CONTROL) { 167 if (msg.routing_id() == MSG_ROUTING_CONTROL) {
167 IPC_BEGIN_MESSAGE_MAP(RenderThread, msg) 168 IPC_BEGIN_MESSAGE_MAP(RenderThread, msg)
168 IPC_MESSAGE_HANDLER(ViewMsg_VisitedLink_NewTable, OnUpdateVisitedLinks) 169 IPC_MESSAGE_HANDLER(ViewMsg_VisitedLink_NewTable, OnUpdateVisitedLinks)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 void RenderThread::InformHostOfCacheStatsLater() { 232 void RenderThread::InformHostOfCacheStatsLater() {
232 // Rate limit informing the host of our cache stats. 233 // Rate limit informing the host of our cache stats.
233 if (!cache_stats_factory_->empty()) 234 if (!cache_stats_factory_->empty())
234 return; 235 return;
235 236
236 MessageLoop::current()->PostDelayedTask(FROM_HERE, 237 MessageLoop::current()->PostDelayedTask(FROM_HERE,
237 cache_stats_factory_->NewRunnableMethod( 238 cache_stats_factory_->NewRunnableMethod(
238 &RenderThread::InformHostOfCacheStats), 239 &RenderThread::InformHostOfCacheStats),
239 kCacheStatsDelayMS); 240 kCacheStatsDelayMS);
240 } 241 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_thread.h ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698