Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1092)

Unified Diff: content/browser/renderer_host/delegated_frame_host.cc

Issue 2135743002: Adds command line switch to disable resize lock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/delegated_frame_host.cc
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index 5540e0be19f94261c9fb2806fe4d15c6339adc02..ae17ebac63c698e75fdee5e862391acf10f9ada5 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -120,6 +120,14 @@ void DelegatedFrameHost::MaybeCreateResizeLock() {
}
bool DelegatedFrameHost::ShouldCreateResizeLock() {
+ static const bool is_enabled =
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableResizeLock) ||
+ base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kEnableResizeLock) == "true";
piman 2016/07/08 18:42:44 Do you want instead do a --disable-resize-lock? O
sky 2016/07/08 19:16:53 I was trying to avoid the negative, but you're rig
+ if (!is_enabled)
+ return false;
+
if (!client_->DelegatedFrameCanCreateResizeLock())
return false;
« no previous file with comments | « no previous file | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698