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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 2800005: Allow POST requests made from an extension process to reuse the same process, (Closed)
Patch Set: . Created 10 years, 6 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 | « no previous file | chrome/renderer/render_view.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 NotificationService::current()->Notify( 244 NotificationService::current()->Notify(
245 NotificationType::EXTENSION_PORT_DELETED_DEBUG, 245 NotificationType::EXTENSION_PORT_DELETED_DEBUG,
246 Source<IPC::Message::Sender>(this), 246 Source<IPC::Message::Sender>(this),
247 NotificationService::NoDetails()); 247 NotificationService::NoDetails());
248 } 248 }
249 249
250 bool BrowserRenderProcessHost::Init(bool is_extensions_process, 250 bool BrowserRenderProcessHost::Init(bool is_extensions_process,
251 URLRequestContextGetter* request_context) { 251 URLRequestContextGetter* request_context) {
252 // calling Init() more than once does nothing, this makes it more convenient 252 // calling Init() more than once does nothing, this makes it more convenient
253 // for the view host which may not be sure in some cases 253 // for the view host which may not be sure in some cases
254 if (channel_.get()) { 254 if (channel_.get())
255 // Ensure that |is_extensions_process| doesn't change across multiple calls
256 // to Init().
257 if (!run_renderer_in_process()) {
258 DCHECK_EQ(extension_process_, is_extensions_process);
259 }
260 return true; 255 return true;
261 }
262 256
263 extension_process_ = is_extensions_process; 257 // It is possible for an extension process to be reused for non-extension
258 // content, e.g. if an extension calls window.open.
259 extension_process_ = extension_process_ || is_extensions_process;
264 260
265 // run the IPC channel on the shared IO thread. 261 // run the IPC channel on the shared IO thread.
266 base::Thread* io_thread = g_browser_process->io_thread(); 262 base::Thread* io_thread = g_browser_process->io_thread();
267 263
268 // Construct the AudioRendererHost with the IO thread. 264 // Construct the AudioRendererHost with the IO thread.
269 audio_renderer_host_ = new AudioRendererHost(); 265 audio_renderer_host_ = new AudioRendererHost();
270 266
271 scoped_refptr<ResourceMessageFilter> resource_message_filter = 267 scoped_refptr<ResourceMessageFilter> resource_message_filter =
272 new ResourceMessageFilter(g_browser_process->resource_dispatcher_host(), 268 new ResourceMessageFilter(g_browser_process->resource_dispatcher_host(),
273 id(), 269 id(),
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 IPC::InvalidPlatformFileForTransit(), 1062 IPC::InvalidPlatformFileForTransit(),
1067 std::vector<std::string>(), 1063 std::vector<std::string>(),
1068 std::string(), 1064 std::string(),
1069 false)); 1065 false));
1070 } 1066 }
1071 } 1067 }
1072 1068
1073 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { 1069 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) {
1074 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); 1070 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable));
1075 } 1071 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/render_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698