| OLD | NEW |
| 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 IPC::Channel::MODE_SERVER, | 464 IPC::Channel::MODE_SERVER, |
| 465 this, | 465 this, |
| 466 BrowserThread::GetMessageLoopProxyForThread( | 466 BrowserThread::GetMessageLoopProxyForThread( |
| 467 BrowserThread::IO).get())); | 467 BrowserThread::IO).get())); |
| 468 | 468 |
| 469 // Call the embedder first so that their IPC filters have priority. | 469 // Call the embedder first so that their IPC filters have priority. |
| 470 GetContentClient()->browser()->RenderProcessHostCreated(this); | 470 GetContentClient()->browser()->RenderProcessHostCreated(this); |
| 471 | 471 |
| 472 CreateMessageFilters(); | 472 CreateMessageFilters(); |
| 473 | 473 |
| 474 // Single-process mode not supported in multiple-dll mode currently. | 474 if (run_renderer_in_process()) { |
| 475 if (run_renderer_in_process() && g_renderer_main_thread_factory) { | 475 DCHECK(g_renderer_main_thread_factory); |
| 476 // Crank up a thread and run the initialization there. With the way that | 476 // Crank up a thread and run the initialization there. With the way that |
| 477 // messages flow between the browser and renderer, this thread is required | 477 // messages flow between the browser and renderer, this thread is required |
| 478 // to prevent a deadlock in single-process mode. Since the primordial | 478 // to prevent a deadlock in single-process mode. Since the primordial |
| 479 // thread in the renderer process runs the WebKit code and can sometimes | 479 // thread in the renderer process runs the WebKit code and can sometimes |
| 480 // make blocking calls to the UI thread (i.e. this thread), they need to run | 480 // make blocking calls to the UI thread (i.e. this thread), they need to run |
| 481 // on separate threads. | 481 // on separate threads. |
| 482 in_process_renderer_.reset(g_renderer_main_thread_factory(channel_id)); | 482 in_process_renderer_.reset(g_renderer_main_thread_factory(channel_id)); |
| 483 | 483 |
| 484 base::Thread::Options options; | 484 base::Thread::Options options; |
| 485 #if defined(OS_WIN) && !defined(OS_MACOSX) | 485 #if defined(OS_WIN) && !defined(OS_MACOSX) |
| (...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1845 // Skip widgets in other processes. | 1845 // Skip widgets in other processes. |
| 1846 if (widget->GetProcess()->GetID() != GetID()) | 1846 if (widget->GetProcess()->GetID() != GetID()) |
| 1847 continue; | 1847 continue; |
| 1848 | 1848 |
| 1849 RenderViewHost* rvh = RenderViewHost::From(widget); | 1849 RenderViewHost* rvh = RenderViewHost::From(widget); |
| 1850 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); | 1850 rvh->UpdateWebkitPreferences(rvh->GetWebkitPreferences()); |
| 1851 } | 1851 } |
| 1852 } | 1852 } |
| 1853 | 1853 |
| 1854 } // namespace content | 1854 } // namespace content |
| OLD | NEW |