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

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

Issue 8536003: Pointer Lock (was Mouse Lock) added to about:flags and passed to WebKit runtime flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pointer lock rename Created 9 years, 1 month 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 web_prefs.accelerated_plugins_enabled = 469 web_prefs.accelerated_plugins_enabled =
470 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins); 470 !command_line.HasSwitch(switches::kDisableAcceleratedPlugins);
471 web_prefs.accelerated_video_enabled = 471 web_prefs.accelerated_video_enabled =
472 !command_line.HasSwitch(switches::kDisableAcceleratedVideo); 472 !command_line.HasSwitch(switches::kDisableAcceleratedVideo);
473 web_prefs.memory_info_enabled = 473 web_prefs.memory_info_enabled =
474 command_line.HasSwitch(switches::kEnableMemoryInfo); 474 command_line.HasSwitch(switches::kEnableMemoryInfo);
475 web_prefs.interactive_form_validation_enabled = 475 web_prefs.interactive_form_validation_enabled =
476 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); 476 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation);
477 web_prefs.fullscreen_enabled = 477 web_prefs.fullscreen_enabled =
478 !command_line.HasSwitch(switches::kDisableFullScreen); 478 !command_line.HasSwitch(switches::kDisableFullScreen);
479 web_prefs.pointer_lock_enabled =
480 command_line.HasSwitch(switches::kEnablePointerLock);
479 web_prefs.allow_displaying_insecure_content = 481 web_prefs.allow_displaying_insecure_content =
480 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); 482 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent);
481 web_prefs.allow_running_insecure_content = 483 web_prefs.allow_running_insecure_content =
482 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); 484 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent);
483 485
484 #if defined(OS_MACOSX) || defined(TOUCH_UI) 486 #if defined(OS_MACOSX) || defined(TOUCH_UI)
485 bool default_enable_scroll_animator = true; 487 bool default_enable_scroll_animator = true;
486 #else 488 #else
487 // On CrOS, the launcher always passes in the --enable flag. 489 // On CrOS, the launcher always passes in the --enable flag.
488 bool default_enable_scroll_animator = false; 490 bool default_enable_scroll_animator = false;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 DictionaryValue* inspector_settings = update.Get(); 581 DictionaryValue* inspector_settings = update.Get();
580 inspector_settings->SetWithoutPathExpansion(key, 582 inspector_settings->SetWithoutPathExpansion(key,
581 Value::CreateStringValue(value)); 583 Value::CreateStringValue(value));
582 } 584 }
583 585
584 void RenderViewHostDelegateHelper::ClearInspectorSettings( 586 void RenderViewHostDelegateHelper::ClearInspectorSettings(
585 content::BrowserContext* browser_context) { 587 content::BrowserContext* browser_context) {
586 Profile::FromBrowserContext(browser_context)->GetPrefs()-> 588 Profile::FromBrowserContext(browser_context)->GetPrefs()->
587 ClearPref(prefs::kWebKitInspectorSettings); 589 ClearPref(prefs::kWebKitInspectorSettings);
588 } 590 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698