Added a command line flag that disables force-compositing-mode and modified the about:flags entry to provide a dropdown with three
options : "DEFAULT", "ENABLED", "DISABLED". This will be useful in conjunction with the FMC field trial as it will allow clients
who are in the FCM trial group to force FCM off. 
BUG=114549
Review URL: https://chromiumcodereview.appspot.com/10546113

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141862 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3663575..0e2c515 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -457,7 +457,8 @@
       GpuProcessHost::gpu_enabled() &&
       !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
   prefs.force_compositing_mode =
-      command_line.HasSwitch(switches::kForceCompositingMode);
+      command_line.HasSwitch(switches::kForceCompositingMode) &&
+      !command_line.HasSwitch(switches::kDisableForceCompositingMode);
   prefs.fixed_position_compositing_enabled =
       command_line.HasSwitch(switches::kEnableCompositingForFixedPosition);
   prefs.accelerated_2d_canvas_enabled =
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 8c25d81..0d3aac4 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -383,6 +383,10 @@
 // the base layer even when compositing is not strictly required.
 const char kForceCompositingMode[]          = "force-compositing-mode";
 
+// This flag disables force compositing mode and prevents it from being enabled
+// via field trials.
+const char kDisableForceCompositingMode[]   = "disable-force-compositing-mode";
+
 // Some field trials may be randomized in the browser, and the randomly selected
 // outcome needs to be propagated to the renderer. For instance, this is used
 // to modify histograms recorded in the renderer, or to get the renderer to
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 674ebf75..da6b4ab 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -47,6 +47,7 @@
 extern const char kDisableFileSystem[];
 CONTENT_EXPORT extern const char kDisableFlash3d[];
 CONTENT_EXPORT extern const char kDisableFlashStage3d[];
+CONTENT_EXPORT extern const char kDisableForceCompositingMode[];
 extern const char kDisableGeolocation[];
 extern const char kDisableGpu[];
 CONTENT_EXPORT extern const char kDisableGLMultisampling[];