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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1660193007: [Presentation API] Adding a flag to disable gesture check for starting presentations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing avayvod@'s comments and several fixes Created 4 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1057 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled); 1057 settings->setSpatialNavigationEnabled(prefs.spatial_navigation_enabled);
1058 1058
1059 settings->setSelectionIncludesAltImageText(true); 1059 settings->setSelectionIncludesAltImageText(true);
1060 1060
1061 settings->setV8CacheOptions( 1061 settings->setV8CacheOptions(
1062 static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options)); 1062 static_cast<WebSettings::V8CacheOptions>(prefs.v8_cache_options));
1063 1063
1064 settings->setImageAnimationPolicy( 1064 settings->setImageAnimationPolicy(
1065 static_cast<WebSettings::ImageAnimationPolicy>(prefs.animation_policy)); 1065 static_cast<WebSettings::ImageAnimationPolicy>(prefs.animation_policy));
1066 1066
1067 settings->setPresentationRequiresUserGesture(
1068 prefs.user_gesture_required_for_presentation);
1069
1067 // Needs to happen before setIgnoreVIewportTagScaleLimits below. 1070 // Needs to happen before setIgnoreVIewportTagScaleLimits below.
1068 web_view->setDefaultPageScaleLimits( 1071 web_view->setDefaultPageScaleLimits(
1069 prefs.default_minimum_page_scale_factor, 1072 prefs.default_minimum_page_scale_factor,
1070 prefs.default_maximum_page_scale_factor); 1073 prefs.default_maximum_page_scale_factor);
1071 1074
1072 #if defined(OS_ANDROID) 1075 #if defined(OS_ANDROID)
1073 settings->setAllowCustomScrollbarInMainFrame(false); 1076 settings->setAllowCustomScrollbarInMainFrame(false);
1074 settings->setTextAutosizingEnabled(prefs.text_autosizing_enabled); 1077 settings->setTextAutosizingEnabled(prefs.text_autosizing_enabled);
1075 settings->setAccessibilityFontScaleFactor(prefs.font_scale_factor); 1078 settings->setAccessibilityFontScaleFactor(prefs.font_scale_factor);
1076 settings->setDeviceScaleAdjustment(prefs.device_scale_adjustment); 1079 settings->setDeviceScaleAdjustment(prefs.device_scale_adjustment);
(...skipping 2446 matching lines...) Expand 10 before | Expand all | Expand 10 after
3523 if (IsUseZoomForDSFEnabled()) { 3526 if (IsUseZoomForDSFEnabled()) {
3524 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3527 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3525 } else { 3528 } else {
3526 webview()->setDeviceScaleFactor(device_scale_factor_); 3529 webview()->setDeviceScaleFactor(device_scale_factor_);
3527 } 3530 }
3528 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3531 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3529 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3532 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3530 } 3533 }
3531 3534
3532 } // namespace content 3535 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698