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

Unified Diff: components/html_viewer/html_widget.cc

Issue 1338433002: Mandoline: Add WebGL support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address review issues Created 5 years, 3 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
Index: components/html_viewer/html_widget.cc
diff --git a/components/html_viewer/html_widget.cc b/components/html_viewer/html_widget.cc
index ce5f4235e1cdd6b618539ec1820106f69668540f..692bcdfd48ab38827d5153ff58e8ddd6f04aef84 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/web_layer_tree_view_impl.h"
@@ -18,6 +19,8 @@
namespace html_viewer {
namespace {
+const char kDisableWebGLSwitch[] = "disable-webgl";
+
scoped_ptr<WebLayerTreeViewImpl> CreateWebLayerTreeView(
GlobalState* global_state) {
return make_scoped_ptr(new WebLayerTreeViewImpl(
@@ -55,6 +58,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

Powered by Google App Engine
This is Rietveld 408576698