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

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

Issue 6581004: Add command line switches and about:flag to enable FPS indicator and compositor layer tree. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes based on feedback Created 9 years, 9 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
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 !command_line.HasSwitch(switches::kDisable3DAPIs) && 278 !command_line.HasSwitch(switches::kDisable3DAPIs) &&
279 !command_line.HasSwitch(switches::kDisableExperimentalWebGL); 279 !command_line.HasSwitch(switches::kDisableExperimentalWebGL);
280 web_prefs.gl_multisampling_enabled = 280 web_prefs.gl_multisampling_enabled =
281 !command_line.HasSwitch(switches::kDisableGLMultisampling); 281 !command_line.HasSwitch(switches::kDisableGLMultisampling);
282 web_prefs.site_specific_quirks_enabled = 282 web_prefs.site_specific_quirks_enabled =
283 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks); 283 !command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
284 web_prefs.allow_file_access_from_file_urls = 284 web_prefs.allow_file_access_from_file_urls =
285 command_line.HasSwitch(switches::kAllowFileAccessFromFiles); 285 command_line.HasSwitch(switches::kAllowFileAccessFromFiles);
286 web_prefs.show_composited_layer_borders = 286 web_prefs.show_composited_layer_borders =
287 command_line.HasSwitch(switches::kShowCompositedLayerBorders); 287 command_line.HasSwitch(switches::kShowCompositedLayerBorders);
288 web_prefs.show_composited_layer_tree =
289 command_line.HasSwitch(switches::kShowCompositedLayerTree);
290 web_prefs.show_fps_counter =
291 command_line.HasSwitch(switches::kShowFPSCounter);
288 web_prefs.accelerated_compositing_enabled = 292 web_prefs.accelerated_compositing_enabled =
289 gpu_enabled() && 293 gpu_enabled() &&
290 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing); 294 !command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
291 web_prefs.accelerated_2d_canvas_enabled = 295 web_prefs.accelerated_2d_canvas_enabled =
292 gpu_enabled() && 296 gpu_enabled() &&
293 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); 297 command_line.HasSwitch(switches::kEnableAccelerated2dCanvas);
294 web_prefs.accelerated_layers_enabled = 298 web_prefs.accelerated_layers_enabled =
295 !command_line.HasSwitch(switches::kDisableAcceleratedLayers); 299 !command_line.HasSwitch(switches::kDisableAcceleratedLayers);
296 web_prefs.composite_to_texture_enabled = 300 web_prefs.composite_to_texture_enabled =
297 command_line.HasSwitch(switches::kEnableCompositeToTexture); 301 command_line.HasSwitch(switches::kEnableCompositeToTexture);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 inspector_settings->SetWithoutPathExpansion(key, 350 inspector_settings->SetWithoutPathExpansion(key,
347 Value::CreateStringValue(value)); 351 Value::CreateStringValue(value));
348 } 352 }
349 353
350 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { 354 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) {
351 DictionaryValue* inspector_settings = 355 DictionaryValue* inspector_settings =
352 profile->GetPrefs()->GetMutableDictionary( 356 profile->GetPrefs()->GetMutableDictionary(
353 prefs::kWebKitInspectorSettings); 357 prefs::kWebKitInspectorSettings);
354 inspector_settings->Clear(); 358 inspector_settings->Clear();
355 } 359 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698