OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 // Now send any options from our own command line we want to propagate. | 1690 // Now send any options from our own command line we want to propagate. |
1691 const base::CommandLine& browser_command_line = | 1691 const base::CommandLine& browser_command_line = |
1692 *base::CommandLine::ForCurrentProcess(); | 1692 *base::CommandLine::ForCurrentProcess(); |
1693 PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); | 1693 PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); |
1694 | 1694 |
1695 // Pass on the browser locale. | 1695 // Pass on the browser locale. |
1696 const std::string locale = | 1696 const std::string locale = |
1697 GetContentClient()->browser()->GetApplicationLocale(); | 1697 GetContentClient()->browser()->GetApplicationLocale(); |
1698 command_line->AppendSwitchASCII(switches::kLang, locale); | 1698 command_line->AppendSwitchASCII(switches::kLang, locale); |
1699 | 1699 |
| 1700 // A non-empty RendererCmdPrefix implies that Zygote is disabled. |
| 1701 if (!base::CommandLine::ForCurrentProcess() |
| 1702 ->GetSwitchValueNative(switches::kRendererCmdPrefix) |
| 1703 .empty()) { |
| 1704 command_line->AppendSwitch(switches::kNoZygote); |
| 1705 } |
| 1706 |
1700 GetContentClient()->browser()->AppendExtraCommandLineSwitches(command_line, | 1707 GetContentClient()->browser()->AppendExtraCommandLineSwitches(command_line, |
1701 GetID()); | 1708 GetID()); |
1702 | 1709 |
1703 if (IsPinchToZoomEnabled()) | 1710 if (IsPinchToZoomEnabled()) |
1704 command_line->AppendSwitch(switches::kEnablePinch); | 1711 command_line->AppendSwitch(switches::kEnablePinch); |
1705 | 1712 |
1706 #if defined(OS_WIN) | 1713 #if defined(OS_WIN) |
1707 command_line->AppendSwitchASCII( | 1714 command_line->AppendSwitchASCII( |
1708 switches::kDeviceScaleFactor, | 1715 switches::kDeviceScaleFactor, |
1709 base::DoubleToString(display::win::GetDPIScale())); | 1716 base::DoubleToString(display::win::GetDPIScale())); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1833 switches::kLoggingLevel, | 1840 switches::kLoggingLevel, |
1834 switches::kMainFrameResizesAreOrientationChanges, | 1841 switches::kMainFrameResizesAreOrientationChanges, |
1835 switches::kMaxUntiledLayerWidth, | 1842 switches::kMaxUntiledLayerWidth, |
1836 switches::kMaxUntiledLayerHeight, | 1843 switches::kMaxUntiledLayerHeight, |
1837 switches::kMemoryMetrics, | 1844 switches::kMemoryMetrics, |
1838 switches::kMojoLocalStorage, | 1845 switches::kMojoLocalStorage, |
1839 switches::kMSEAudioBufferSizeLimit, | 1846 switches::kMSEAudioBufferSizeLimit, |
1840 switches::kMSEVideoBufferSizeLimit, | 1847 switches::kMSEVideoBufferSizeLimit, |
1841 switches::kNoReferrers, | 1848 switches::kNoReferrers, |
1842 switches::kNoSandbox, | 1849 switches::kNoSandbox, |
| 1850 switches::kNoZygote, |
1843 switches::kOverridePluginPowerSaverForTesting, | 1851 switches::kOverridePluginPowerSaverForTesting, |
1844 switches::kPassiveListenersDefault, | 1852 switches::kPassiveListenersDefault, |
1845 switches::kPpapiInProcess, | 1853 switches::kPpapiInProcess, |
1846 switches::kProfilerTiming, | 1854 switches::kProfilerTiming, |
1847 switches::kReducedReferrerGranularity, | 1855 switches::kReducedReferrerGranularity, |
1848 switches::kReduceSecurityForTesting, | 1856 switches::kReduceSecurityForTesting, |
1849 switches::kRegisterPepperPlugins, | 1857 switches::kRegisterPepperPlugins, |
1850 switches::kRendererStartupDialog, | 1858 switches::kRendererStartupDialog, |
1851 switches::kRootLayerScrolls, | 1859 switches::kRootLayerScrolls, |
1852 switches::kShowPaintRects, | 1860 switches::kShowPaintRects, |
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3119 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3127 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3120 | 3128 |
3121 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3129 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3122 // Capture the error message in a crash key value. | 3130 // Capture the error message in a crash key value. |
3123 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3131 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3124 bad_message::ReceivedBadMessage(render_process_id, | 3132 bad_message::ReceivedBadMessage(render_process_id, |
3125 bad_message::RPH_MOJO_PROCESS_ERROR); | 3133 bad_message::RPH_MOJO_PROCESS_ERROR); |
3126 } | 3134 } |
3127 | 3135 |
3128 } // namespace content | 3136 } // namespace content |
OLD | NEW |