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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 | Annotate | Revision Log
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 // 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 "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 if (renderer_path.empty()) 481 if (renderer_path.empty())
482 return false; 482 return false;
483 483
484 // Setup the IPC channel. 484 // Setup the IPC channel.
485 const std::string channel_id = 485 const std::string channel_id =
486 IPC::Channel::GenerateVerifiedChannelID(std::string()); 486 IPC::Channel::GenerateVerifiedChannelID(std::string());
487 channel_.reset( 487 channel_.reset(
488 #if defined(OS_ANDROID) 488 #if defined(OS_ANDROID)
489 // Android WebView needs to be able to wait from the UI thread to support 489 // Android WebView needs to be able to wait from the UI thread to support
490 // the synchronous legacy APIs. 490 // the synchronous legacy APIs.
491 browser_command_line.HasSwitch(switches::kEnableWebViewSynchronousAPIs) ? 491 browser_command_line.HasSwitch(switches::kEnableWebViewSynchronousAPIs)
492 new IPC::SyncChannel( 492 ? new IPC::SyncChannel(
493 channel_id, IPC::Channel::MODE_SERVER, this, 493 channel_id,
494 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), 494 IPC::Channel::MODE_SERVER,
495 true, &dummy_shutdown_event_) : 495 this,
496 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
497 true,
498 &dummy_shutdown_event_)
499 :
496 #endif 500 #endif
497 new IPC::ChannelProxy( 501 new IPC::ChannelProxy(channel_id,
498 channel_id, IPC::Channel::MODE_SERVER, this, 502 IPC::Channel::MODE_SERVER,
499 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); 503 this,
504 BrowserThread::GetMessageLoopProxyForThread(
505 BrowserThread::IO).get()));
500 506
501 // Call the embedder first so that their IPC filters have priority. 507 // Call the embedder first so that their IPC filters have priority.
502 GetContentClient()->browser()->RenderProcessHostCreated(this); 508 GetContentClient()->browser()->RenderProcessHostCreated(this);
503 509
504 CreateMessageFilters(); 510 CreateMessageFilters();
505 511
506 // Single-process mode not supported in split-dll mode. 512 // Single-process mode not supported in split-dll mode.
507 #if !defined(CHROME_SPLIT_DLL) 513 #if !defined(CHROME_SPLIT_DLL)
508 if (run_renderer_in_process()) { 514 if (run_renderer_in_process()) {
509 // Crank up a thread and run the initialization there. With the way that 515 // Crank up a thread and run the initialization there. With the way that
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1798 continue; 1804 continue;
1799 1805
1800 RenderViewHost* rvh = 1806 RenderViewHost* rvh =
1801 RenderViewHost::From(const_cast<RenderWidgetHost*>(widget)); 1807 RenderViewHost::From(const_cast<RenderWidgetHost*>(widget));
1802 1808
1803 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); 1809 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences());
1804 } 1810 }
1805 } 1811 }
1806 1812
1807 } // namespace content 1813 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698