| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "chrome/browser/visitedlink_master.h" | 43 #include "chrome/browser/visitedlink_master.h" |
| 44 #include "chrome/common/chrome_switches.h" | 44 #include "chrome/common/chrome_switches.h" |
| 45 #include "chrome/common/chrome_descriptors.h" | 45 #include "chrome/common/chrome_descriptors.h" |
| 46 #include "chrome/common/child_process_info.h" | 46 #include "chrome/common/child_process_info.h" |
| 47 #include "chrome/common/logging_chrome.h" | 47 #include "chrome/common/logging_chrome.h" |
| 48 #include "chrome/common/notification_service.h" | 48 #include "chrome/common/notification_service.h" |
| 49 #include "chrome/common/process_watcher.h" | 49 #include "chrome/common/process_watcher.h" |
| 50 #include "chrome/common/render_messages.h" | 50 #include "chrome/common/render_messages.h" |
| 51 #include "chrome/common/result_codes.h" | 51 #include "chrome/common/result_codes.h" |
| 52 #include "chrome/renderer/render_process.h" | 52 #include "chrome/renderer/render_process.h" |
| 53 #include "chrome/installer/util/google_update_settings.h" |
| 53 #include "grit/generated_resources.h" | 54 #include "grit/generated_resources.h" |
| 54 | 55 |
| 55 #if defined(OS_LINUX) | 56 #if defined(OS_LINUX) |
| 56 #include "chrome/browser/zygote_host_linux.h" | 57 #include "chrome/browser/zygote_host_linux.h" |
| 57 #include "chrome/browser/renderer_host/render_crash_handler_host_linux.h" | 58 #include "chrome/browser/renderer_host/render_crash_handler_host_linux.h" |
| 58 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" | 59 #include "chrome/browser/renderer_host/render_sandbox_host_linux.h" |
| 59 #endif | 60 #endif |
| 60 | 61 |
| 61 using WebKit::WebCache; | 62 using WebKit::WebCache; |
| 62 | 63 |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 const bool has_cmd_prefix = | 383 const bool has_cmd_prefix = |
| 383 browser_command_line.HasSwitch(switches::kRendererCmdPrefix); | 384 browser_command_line.HasSwitch(switches::kRendererCmdPrefix); |
| 384 if (has_cmd_prefix) { | 385 if (has_cmd_prefix) { |
| 385 // launch the renderer child with some prefix (usually "gdb --args") | 386 // launch the renderer child with some prefix (usually "gdb --args") |
| 386 const std::wstring prefix = | 387 const std::wstring prefix = |
| 387 browser_command_line.GetSwitchValue(switches::kRendererCmdPrefix); | 388 browser_command_line.GetSwitchValue(switches::kRendererCmdPrefix); |
| 388 cmd_line.PrependWrapper(prefix); | 389 cmd_line.PrependWrapper(prefix); |
| 389 } | 390 } |
| 390 #endif // OS_POSIX | 391 #endif // OS_POSIX |
| 391 | 392 |
| 393 #if defined(OS_LINUX) |
| 394 if (GoogleUpdateSettings::GetCollectStatsConsent()) |
| 395 cmd_line.AppendSwitch(switches::kRendererCrashDump); |
| 396 #endif |
| 397 |
| 392 cmd_line.AppendSwitchWithValue(switches::kProcessType, | 398 cmd_line.AppendSwitchWithValue(switches::kProcessType, |
| 393 switches::kRendererProcess); | 399 switches::kRendererProcess); |
| 394 | 400 |
| 395 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, | 401 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, |
| 396 ASCIIToWide(channel_id)); | 402 ASCIIToWide(channel_id)); |
| 397 | 403 |
| 398 const std::wstring& profile_path = | 404 const std::wstring& profile_path = |
| 399 browser_command_line.GetSwitchValue(switches::kUserDataDir); | 405 browser_command_line.GetSwitchValue(switches::kUserDataDir); |
| 400 if (!profile_path.empty()) | 406 if (!profile_path.empty()) |
| 401 cmd_line.AppendSwitchWithValue(switches::kUserDataDir, | 407 cmd_line.AppendSwitchWithValue(switches::kUserDataDir, |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 void BrowserRenderProcessHost::OnExtensionRemoveListener( | 975 void BrowserRenderProcessHost::OnExtensionRemoveListener( |
| 970 const std::string& event_name) { | 976 const std::string& event_name) { |
| 971 ExtensionMessageService::GetInstance(profile()->GetRequestContext())-> | 977 ExtensionMessageService::GetInstance(profile()->GetRequestContext())-> |
| 972 RemoveEventListener(event_name, pid()); | 978 RemoveEventListener(event_name, pid()); |
| 973 } | 979 } |
| 974 | 980 |
| 975 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) { | 981 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) { |
| 976 ExtensionMessageService::GetInstance(profile()->GetRequestContext())-> | 982 ExtensionMessageService::GetInstance(profile()->GetRequestContext())-> |
| 977 CloseChannel(port_id); | 983 CloseChannel(port_id); |
| 978 } | 984 } |
| OLD | NEW |