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

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

Issue 7034052: Linux/CrOS smooth scrolling support - behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 web_prefs.memory_info_enabled = 335 web_prefs.memory_info_enabled =
336 command_line.HasSwitch(switches::kEnableMemoryInfo); 336 command_line.HasSwitch(switches::kEnableMemoryInfo);
337 web_prefs.interactive_form_validation_enabled = 337 web_prefs.interactive_form_validation_enabled =
338 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation); 338 !command_line.HasSwitch(switches::kDisableInteractiveFormValidation);
339 web_prefs.fullscreen_enabled = 339 web_prefs.fullscreen_enabled =
340 command_line.HasSwitch(switches::kEnableFullScreen); 340 command_line.HasSwitch(switches::kEnableFullScreen);
341 web_prefs.allow_displaying_insecure_content = 341 web_prefs.allow_displaying_insecure_content =
342 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent); 342 prefs->GetBoolean(prefs::kWebKitAllowDisplayingInsecureContent);
343 web_prefs.allow_running_insecure_content = 343 web_prefs.allow_running_insecure_content =
344 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent); 344 prefs->GetBoolean(prefs::kWebKitAllowRunningInsecureContent);
345 web_prefs.enable_scroll_animator =
346 command_line.HasSwitch(switches::kEnableSmoothScrolling);
345 347
346 // The user stylesheet watcher may not exist in a testing profile. 348 // The user stylesheet watcher may not exist in a testing profile.
347 if (profile->GetUserStyleSheetWatcher()) { 349 if (profile->GetUserStyleSheetWatcher()) {
348 web_prefs.user_style_sheet_enabled = true; 350 web_prefs.user_style_sheet_enabled = true;
349 web_prefs.user_style_sheet_location = 351 web_prefs.user_style_sheet_location =
350 profile->GetUserStyleSheetWatcher()->user_style_sheet(); 352 profile->GetUserStyleSheetWatcher()->user_style_sheet();
351 } else { 353 } else {
352 web_prefs.user_style_sheet_enabled = false; 354 web_prefs.user_style_sheet_enabled = false;
353 } 355 }
354 } 356 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 DictionaryPrefUpdate update(profile->GetPrefs(), 397 DictionaryPrefUpdate update(profile->GetPrefs(),
396 prefs::kWebKitInspectorSettings); 398 prefs::kWebKitInspectorSettings);
397 DictionaryValue* inspector_settings = update.Get(); 399 DictionaryValue* inspector_settings = update.Get();
398 inspector_settings->SetWithoutPathExpansion(key, 400 inspector_settings->SetWithoutPathExpansion(key,
399 Value::CreateStringValue(value)); 401 Value::CreateStringValue(value));
400 } 402 }
401 403
402 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) { 404 void RenderViewHostDelegateHelper::ClearInspectorSettings(Profile* profile) {
403 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings); 405 profile->GetPrefs()->ClearPref(prefs::kWebKitInspectorSettings);
404 } 406 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698