diff options
author | mnaganov <mnaganov@chromium.org> | 2015-10-14 16:41:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-14 23:41:56 +0000 |
commit | 271ecc7d94cd2d87c62ad90ed3f70458b3cf9c09 (patch) | |
tree | db4aec15fb45f9f09ebd2c453583ce8e85ffb563 | |
parent | c4d274a47875d10f80066a46bec8332abf590b79 (diff) | |
download | chromium_src-271ecc7d94cd2d87c62ad90ed3f70458b3cf9c09.zip chromium_src-271ecc7d94cd2d87c62ad90ed3f70458b3cf9c09.tar.gz chromium_src-271ecc7d94cd2d87c62ad90ed3f70458b3cf9c09.tar.bz2 |
[Android WebView] Pass kDisablePageVisibility to renderer child
Review URL: https://codereview.chromium.org/1407803002
Cr-Commit-Position: refs/heads/master@{#354152}
-rw-r--r-- | android_webview/browser/aw_content_browser_client.cc | 9 | ||||
-rw-r--r-- | android_webview/common/aw_switches.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc index 0c027e1..00af002 100644 --- a/android_webview/browser/aw_content_browser_client.cc +++ b/android_webview/browser/aw_content_browser_client.cc @@ -18,6 +18,7 @@ #include "android_webview/browser/net_disk_cache_remover.h" #include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h" #include "android_webview/common/aw_descriptors.h" +#include "android_webview/common/aw_switches.h" #include "android_webview/common/render_view_messages.h" #include "android_webview/common/url_constants.h" #include "base/android/locale_utils.h" @@ -293,6 +294,14 @@ void AwContentBrowserClient::AppendExtraCommandLineSwitches( // The only kind of a child process WebView can have is renderer. DCHECK_EQ(switches::kRendererProcess, command_line->GetSwitchValueASCII(switches::kProcessType)); + + const base::CommandLine& browser_command_line = + *base::CommandLine::ForCurrentProcess(); + static const char* const kCommonSwitchNames[] = { + switches::kDisablePageVisibility, + }; + command_line->CopySwitchesFrom(browser_command_line, kCommonSwitchNames, + arraysize(kCommonSwitchNames)); } } diff --git a/android_webview/common/aw_switches.h b/android_webview/common/aw_switches.h index 7f1dd1b..44a87de 100644 --- a/android_webview/common/aw_switches.h +++ b/android_webview/common/aw_switches.h @@ -10,6 +10,10 @@ namespace switches { extern const char kDisablePageVisibility[]; extern const char kWebViewSandboxedRenderer[]; +// Please note that if you are adding a flag that is intended for a renderer, +// you also need to add it into +// AwContentBrowserClient::AppendExtraCommandLineSwitches. + } // namespace switches #endif // ANDROID_WEBVIEW_COMMON_AW_SWITCHES_H_ |