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

Side by Side Diff: webkit/glue/webpreferences.cc

Issue 6339004: Add run-time enable support for the web audio API... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/webpreferences.h" 5 #include "webkit/glue/webpreferences.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 databases_enabled(false), 53 databases_enabled(false),
54 application_cache_enabled(false), 54 application_cache_enabled(false),
55 tabs_to_links(true), 55 tabs_to_links(true),
56 caret_browsing_enabled(false), 56 caret_browsing_enabled(false),
57 hyperlink_auditing_enabled(true), 57 hyperlink_auditing_enabled(true),
58 user_style_sheet_enabled(false), 58 user_style_sheet_enabled(false),
59 author_and_user_styles_enabled(true), 59 author_and_user_styles_enabled(true),
60 frame_flattening_enabled(false), 60 frame_flattening_enabled(false),
61 allow_universal_access_from_file_urls(false), 61 allow_universal_access_from_file_urls(false),
62 allow_file_access_from_file_urls(false), 62 allow_file_access_from_file_urls(false),
63 webaudio_enabled(false),
63 experimental_webgl_enabled(false), 64 experimental_webgl_enabled(false),
64 show_composited_layer_borders(false), 65 show_composited_layer_borders(false),
65 accelerated_compositing_enabled(false), 66 accelerated_compositing_enabled(false),
66 accelerated_layers_enabled(false), 67 accelerated_layers_enabled(false),
67 accelerated_video_enabled(false), 68 accelerated_video_enabled(false),
68 accelerated_2d_canvas_enabled(false), 69 accelerated_2d_canvas_enabled(false),
69 accelerated_plugins_enabled(false), 70 accelerated_plugins_enabled(false),
70 memory_info_enabled(false) { 71 memory_info_enabled(false) {
71 } 72 }
72 73
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // universal access. Only test shell will enable this. 135 // universal access. Only test shell will enable this.
135 settings->setAllowUniversalAccessFromFileURLs( 136 settings->setAllowUniversalAccessFromFileURLs(
136 allow_universal_access_from_file_urls); 137 allow_universal_access_from_file_urls);
137 settings->setAllowFileAccessFromFileURLs(allow_file_access_from_file_urls); 138 settings->setAllowFileAccessFromFileURLs(allow_file_access_from_file_urls);
138 139
139 // We prevent WebKit from checking if it needs to add a "text direction" 140 // We prevent WebKit from checking if it needs to add a "text direction"
140 // submenu to a context menu. it is not only because we don't need the result 141 // submenu to a context menu. it is not only because we don't need the result
141 // but also because it cause a possible crash in Editor::hasBidiSelection(). 142 // but also because it cause a possible crash in Editor::hasBidiSelection().
142 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); 143 settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded();
143 144
145 // Enable the web audio API if requested on the command line.
146 settings->setWebAudioEnabled(webaudio_enabled);
147
144 // Enable experimental WebGL support if requested on command line 148 // Enable experimental WebGL support if requested on command line
145 // and support is compiled in. 149 // and support is compiled in.
146 bool enable_webgl = 150 bool enable_webgl =
147 WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled; 151 WebRuntimeFeatures::isWebGLEnabled() && experimental_webgl_enabled;
148 settings->setExperimentalWebGLEnabled(enable_webgl); 152 settings->setExperimentalWebGLEnabled(enable_webgl);
149 153
150 // Display colored borders around composited render layers if requested 154 // Display colored borders around composited render layers if requested
151 // on command line. 155 // on command line.
152 settings->setShowDebugBorders(show_composited_layer_borders); 156 settings->setShowDebugBorders(show_composited_layer_borders);
153 157
(...skipping 25 matching lines...) Expand all
179 183
180 for (WebInspectorPreferences::const_iterator it = inspector_settings.begin(); 184 for (WebInspectorPreferences::const_iterator it = inspector_settings.begin();
181 it != inspector_settings.end(); ++it) 185 it != inspector_settings.end(); ++it)
182 web_view->setInspectorSetting(WebString::fromUTF8(it->first), 186 web_view->setInspectorSetting(WebString::fromUTF8(it->first),
183 WebString::fromUTF8(it->second)); 187 WebString::fromUTF8(it->second));
184 188
185 // Tabs to link is not part of the settings. WebCore calls 189 // Tabs to link is not part of the settings. WebCore calls
186 // ChromeClient::tabsToLinks which is part of the glue code. 190 // ChromeClient::tabsToLinks which is part of the glue code.
187 web_view->setTabsToLinks(tabs_to_links); 191 web_view->setTabsToLinks(tabs_to_links);
188 } 192 }
OLDNEW
« no previous file with comments | « webkit/glue/webpreferences.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698