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

Side by Side Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 8364018: Enable privileged WebGL extensions for Chrome extensions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 2 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 | « chrome/browser/extensions/extension_host.cc ('k') | content/common/view_messages.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/tab_contents/render_view_host_delegate_helper.h" 5 #include "chrome/browser/tab_contents/render_view_host_delegate_helper.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 !command_line.HasSwitch(switches::kDisableDatabases); 419 !command_line.HasSwitch(switches::kDisableDatabases);
420 web_prefs.webaudio_enabled = 420 web_prefs.webaudio_enabled =
421 !command_line.HasSwitch(switches::kDisableWebAudio); 421 !command_line.HasSwitch(switches::kDisableWebAudio);
422 web_prefs.experimental_webgl_enabled = 422 web_prefs.experimental_webgl_enabled =
423 GpuProcessHost::gpu_enabled() && 423 GpuProcessHost::gpu_enabled() &&
424 !command_line.HasSwitch(switches::kDisable3DAPIs) && 424 !command_line.HasSwitch(switches::kDisable3DAPIs) &&
425 !prefs->GetBoolean(prefs::kDisable3DAPIs) && 425 !prefs->GetBoolean(prefs::kDisable3DAPIs) &&
426 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); 426 !command_line.HasSwitch(switches::kDisableExperimentalWebGL);
427 web_prefs.gl_multisampling_enabled = 427 web_prefs.gl_multisampling_enabled =
428 !command_line.HasSwitch(switches::kDisableGLMultisampling); 428 !command_line.HasSwitch(switches::kDisableGLMultisampling);
429 web_prefs.privileged_webgl_extensions_enabled =
430 command_line.HasSwitch(switches::kEnablePrivilegedWebGLExtensions);
429 web_prefs.site_specific_quirks_enabled = 431 web_prefs.site_specific_quirks_enabled =
430 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); 432 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
431 web_prefs.allow_file_access_from_file_urls = 433 web_prefs.allow_file_access_from_file_urls =
432 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 434 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
433 web_prefs.show_composited_layer_borders = 435 web_prefs.show_composited_layer_borders =
434 command_line.HasSwitch(switches::kShowCompositedLayerBorders); 436 command_line.HasSwitch(switches::kShowCompositedLayerBorders);
435 web_prefs.show_composited_layer_tree = 437 web_prefs.show_composited_layer_tree =
436 command_line.HasSwitch(switches::kShowCompositedLayerTree); 438 command_line.HasSwitch(switches::kShowCompositedLayerTree);
437 web_prefs.show_fps_counter = 439 web_prefs.show_fps_counter =
438 command_line.HasSwitch(switches::kShowFPSCounter); 440 command_line.HasSwitch(switches::kShowFPSCounter);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 DictionaryValue* inspector_settings = update.Get(); 545 DictionaryValue* inspector_settings = update.Get();
544 inspector_settings->SetWithoutPathExpansion(key, 546 inspector_settings->SetWithoutPathExpansion(key,
545 Value::CreateStringValue(value)); 547 Value::CreateStringValue(value));
546 } 548 }
547 549
548 void RenderViewHostDelegateHelper::ClearInspectorSettings( 550 void RenderViewHostDelegateHelper::ClearInspectorSettings(
549 content::BrowserContext* browser_context) { 551 content::BrowserContext* browser_context) {
550 Profile::FromBrowserContext(browser_context)->GetPrefs()-> 552 Profile::FromBrowserContext(browser_context)->GetPrefs()->
551 ClearPref(prefs::kWebKitInspectorSettings); 553 ClearPref(prefs::kWebKitInspectorSettings);
552 } 554 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698