Index: components/html_viewer/html_widget.cc |
diff --git a/components/html_viewer/html_widget.cc b/components/html_viewer/html_widget.cc |
index 93b03ecba034e6cc6d9a52220de3014b31185e7e..aacfcacd52b1443f1d788b1af1dcd8f4c0b53755 100644 |
--- a/components/html_viewer/html_widget.cc |
+++ b/components/html_viewer/html_widget.cc |
@@ -4,6 +4,7 @@ |
#include "components/html_viewer/html_widget.h" |
+#include "base/command_line.h" |
#include "components/html_viewer/global_state.h" |
#include "components/html_viewer/ime_controller.h" |
#include "components/html_viewer/stats_collection_controller.h" |
@@ -20,6 +21,8 @@ |
namespace html_viewer { |
namespace { |
+const char kDisableWebGLSwitch[] = "disable-webgl"; |
+ |
scoped_ptr<WebLayerTreeViewImpl> CreateWebLayerTreeView( |
GlobalState* global_state) { |
return make_scoped_ptr(new WebLayerTreeViewImpl( |
@@ -57,6 +60,10 @@ void ConfigureSettings(blink::WebSettings* settings) { |
settings->setDefaultFontSize(16); |
settings->setLoadsImagesAutomatically(true); |
settings->setJavaScriptEnabled(true); |
+ |
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
+ settings->setExperimentalWebGLEnabled( |
+ !command_line->HasSwitch(kDisableWebGLSwitch)); |
} |
} // namespace |