| OLD | NEW |
| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 scoped_refptr<ResourceMessageFilter> resource_message_filter = | 267 scoped_refptr<ResourceMessageFilter> resource_message_filter = |
| 268 new ResourceMessageFilter(g_browser_process->resource_dispatcher_host(), | 268 new ResourceMessageFilter(g_browser_process->resource_dispatcher_host(), |
| 269 id(), | 269 id(), |
| 270 audio_renderer_host_.get(), | 270 audio_renderer_host_.get(), |
| 271 PluginService::GetInstance(), | 271 PluginService::GetInstance(), |
| 272 g_browser_process->print_job_manager(), | 272 g_browser_process->print_job_manager(), |
| 273 profile(), | 273 profile(), |
| 274 widget_helper_, | 274 widget_helper_, |
| 275 request_context); | 275 request_context); |
| 276 | 276 |
| 277 std::wstring renderer_prefix; | 277 CommandLine::StringType renderer_prefix; |
| 278 #if defined(OS_POSIX) | 278 #if defined(OS_POSIX) |
| 279 // A command prefix is something prepended to the command line of the spawned | 279 // A command prefix is something prepended to the command line of the spawned |
| 280 // process. It is supported only on POSIX systems. | 280 // process. It is supported only on POSIX systems. |
| 281 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); | 281 const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess(); |
| 282 renderer_prefix = | 282 renderer_prefix = |
| 283 browser_command_line.GetSwitchValue(switches::kRendererCmdPrefix); | 283 browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix); |
| 284 #endif // defined(OS_POSIX) | 284 #endif // defined(OS_POSIX) |
| 285 | 285 |
| 286 // Find the renderer before creating the channel so if this fails early we | 286 // Find the renderer before creating the channel so if this fails early we |
| 287 // return without creating the channel. | 287 // return without creating the channel. |
| 288 FilePath renderer_path = ChildProcessHost::GetChildPath( | 288 FilePath renderer_path = |
| 289 renderer_prefix.empty()); | 289 ChildProcessHost::GetChildPath(renderer_prefix.empty()); |
| 290 if (renderer_path.empty()) | 290 if (renderer_path.empty()) |
| 291 return false; | 291 return false; |
| 292 | 292 |
| 293 // Setup the IPC channel. | 293 // Setup the IPC channel. |
| 294 const std::string channel_id = | 294 const std::string channel_id = |
| 295 ChildProcessInfo::GenerateRandomChannelID(this); | 295 ChildProcessInfo::GenerateRandomChannelID(this); |
| 296 channel_.reset( | 296 channel_.reset( |
| 297 new IPC::SyncChannel(channel_id, IPC::Channel::MODE_SERVER, this, | 297 new IPC::SyncChannel(channel_id, IPC::Channel::MODE_SERVER, this, |
| 298 resource_message_filter, | 298 resource_message_filter, |
| 299 io_thread->message_loop(), true, | 299 io_thread->message_loop(), true, |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 IPC::InvalidPlatformFileForTransit(), | 1066 IPC::InvalidPlatformFileForTransit(), |
| 1067 std::vector<std::string>(), | 1067 std::vector<std::string>(), |
| 1068 std::string(), | 1068 std::string(), |
| 1069 false)); | 1069 false)); |
| 1070 } | 1070 } |
| 1071 } | 1071 } |
| 1072 | 1072 |
| 1073 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { | 1073 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { |
| 1074 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); | 1074 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); |
| 1075 } | 1075 } |
| OLD | NEW |