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 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1647 // Now send any options from our own command line we want to propagate. | 1647 // Now send any options from our own command line we want to propagate. |
1648 const base::CommandLine& browser_command_line = | 1648 const base::CommandLine& browser_command_line = |
1649 *base::CommandLine::ForCurrentProcess(); | 1649 *base::CommandLine::ForCurrentProcess(); |
1650 PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); | 1650 PropagateBrowserCommandLineToRenderer(browser_command_line, command_line); |
1651 | 1651 |
1652 // Pass on the browser locale. | 1652 // Pass on the browser locale. |
1653 const std::string locale = | 1653 const std::string locale = |
1654 GetContentClient()->browser()->GetApplicationLocale(); | 1654 GetContentClient()->browser()->GetApplicationLocale(); |
1655 command_line->AppendSwitchASCII(switches::kLang, locale); | 1655 command_line->AppendSwitchASCII(switches::kLang, locale); |
1656 | 1656 |
1657 // A non-empty RendererCmdPrefix implies that Zygote is disabled. | |
jam
2017/05/05 00:21:22
this is only when --no-zygote is specified right?
| |
1658 if (!base::CommandLine::ForCurrentProcess() | |
1659 ->GetSwitchValueNative(switches::kRendererCmdPrefix) | |
1660 .empty()) { | |
1661 command_line->AppendSwitch(switches::kNoZygote); | |
1662 } | |
1663 | |
1657 GetContentClient()->browser()->AppendExtraCommandLineSwitches(command_line, | 1664 GetContentClient()->browser()->AppendExtraCommandLineSwitches(command_line, |
1658 GetID()); | 1665 GetID()); |
1659 | 1666 |
1660 if (IsPinchToZoomEnabled()) | 1667 if (IsPinchToZoomEnabled()) |
1661 command_line->AppendSwitch(switches::kEnablePinch); | 1668 command_line->AppendSwitch(switches::kEnablePinch); |
1662 | 1669 |
1663 #if defined(OS_WIN) | 1670 #if defined(OS_WIN) |
1664 command_line->AppendSwitchASCII( | 1671 command_line->AppendSwitchASCII( |
1665 switches::kDeviceScaleFactor, | 1672 switches::kDeviceScaleFactor, |
1666 base::DoubleToString(display::win::GetDPIScale())); | 1673 base::DoubleToString(display::win::GetDPIScale())); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1788 switches::kLoggingLevel, | 1795 switches::kLoggingLevel, |
1789 switches::kMainFrameResizesAreOrientationChanges, | 1796 switches::kMainFrameResizesAreOrientationChanges, |
1790 switches::kMaxUntiledLayerWidth, | 1797 switches::kMaxUntiledLayerWidth, |
1791 switches::kMaxUntiledLayerHeight, | 1798 switches::kMaxUntiledLayerHeight, |
1792 switches::kMemoryMetrics, | 1799 switches::kMemoryMetrics, |
1793 switches::kMojoLocalStorage, | 1800 switches::kMojoLocalStorage, |
1794 switches::kMSEAudioBufferSizeLimit, | 1801 switches::kMSEAudioBufferSizeLimit, |
1795 switches::kMSEVideoBufferSizeLimit, | 1802 switches::kMSEVideoBufferSizeLimit, |
1796 switches::kNoReferrers, | 1803 switches::kNoReferrers, |
1797 switches::kNoSandbox, | 1804 switches::kNoSandbox, |
1805 switches::kNoZygote, | |
1798 switches::kOverridePluginPowerSaverForTesting, | 1806 switches::kOverridePluginPowerSaverForTesting, |
1799 switches::kPassiveListenersDefault, | 1807 switches::kPassiveListenersDefault, |
1800 switches::kPpapiInProcess, | 1808 switches::kPpapiInProcess, |
1801 switches::kProfilerTiming, | 1809 switches::kProfilerTiming, |
1802 switches::kReducedReferrerGranularity, | 1810 switches::kReducedReferrerGranularity, |
1803 switches::kReduceSecurityForTesting, | 1811 switches::kReduceSecurityForTesting, |
1804 switches::kRegisterPepperPlugins, | 1812 switches::kRegisterPepperPlugins, |
1805 switches::kRendererStartupDialog, | 1813 switches::kRendererStartupDialog, |
1806 switches::kRootLayerScrolls, | 1814 switches::kRootLayerScrolls, |
1807 switches::kShowPaintRects, | 1815 switches::kShowPaintRects, |
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3076 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; | 3084 LOG(ERROR) << "Terminating render process for bad Mojo message: " << error; |
3077 | 3085 |
3078 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. | 3086 // The ReceivedBadMessage call below will trigger a DumpWithoutCrashing. |
3079 // Capture the error message in a crash key value. | 3087 // Capture the error message in a crash key value. |
3080 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); | 3088 base::debug::ScopedCrashKey error_key_value("mojo-message-error", error); |
3081 bad_message::ReceivedBadMessage(render_process_id, | 3089 bad_message::ReceivedBadMessage(render_process_id, |
3082 bad_message::RPH_MOJO_PROCESS_ERROR); | 3090 bad_message::RPH_MOJO_PROCESS_ERROR); |
3083 } | 3091 } |
3084 | 3092 |
3085 } // namespace content | 3093 } // namespace content |
OLD | NEW |