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

Side by Side Diff: third_party/WebKit/public/web/WebSettings.h

Issue 1965493002: Add runtime setting to force passive event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments Created 4 years, 7 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Defines user preference for text track kind. 88 // Defines user preference for text track kind.
89 enum class TextTrackKindUserPreference { 89 enum class TextTrackKindUserPreference {
90 // Display only tracks marked as default 90 // Display only tracks marked as default
91 Default, 91 Default,
92 // If available, display captions track in preferred language, else disp lay subtitles. 92 // If available, display captions track in preferred language, else disp lay subtitles.
93 Captions, 93 Captions,
94 // If available, display subtitles track in preferred language, else dis play captions. 94 // If available, display subtitles track in preferred language, else dis play captions.
95 Subtitles 95 Subtitles
96 }; 96 };
97 97
98 // Defines the default for 'passive' field used in the AddEventListenerOptio ns interface
99 // when javascript calls addEventListener.
100 enum class PassiveEventListenerDefault {
101 False, // Default of false.
102 True, // Default of true.
103 DocumentTrue, // Default of true for document level elements, false othe rwise.
104 ForceAllTrue // Force all values to be true even when specified.
105 };
106
98 // Sets value of a setting by its string identifier from Settings.in and 107 // Sets value of a setting by its string identifier from Settings.in and
99 // string representation of value. An enum's string representation is the 108 // string representation of value. An enum's string representation is the
100 // string representation of the integer value of the enum. 109 // string representation of the integer value of the enum.
101 virtual void setFromStrings(const WebString& name, const WebString& value) = 0; 110 virtual void setFromStrings(const WebString& name, const WebString& value) = 0;
102 111
103 virtual bool mainFrameResizesAreOrientationChanges() const = 0; 112 virtual bool mainFrameResizesAreOrientationChanges() const = 0;
104 virtual bool shrinksViewportContentToFit() const = 0; 113 virtual bool shrinksViewportContentToFit() const = 0;
105 virtual bool viewportEnabled() const = 0; 114 virtual bool viewportEnabled() const = 0;
106 virtual void setAccelerated2dCanvasEnabled(bool) = 0; 115 virtual void setAccelerated2dCanvasEnabled(bool) = 0;
107 virtual void setAccelerated2dCanvasMSAASampleCount(int) = 0; 116 virtual void setAccelerated2dCanvasMSAASampleCount(int) = 0;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 virtual void setMainFrameResizesAreOrientationChanges(bool) = 0; 186 virtual void setMainFrameResizesAreOrientationChanges(bool) = 0;
178 virtual void setMaxTouchPoints(int) = 0; 187 virtual void setMaxTouchPoints(int) = 0;
179 virtual void setMediaControlsOverlayPlayButtonEnabled(bool) = 0; 188 virtual void setMediaControlsOverlayPlayButtonEnabled(bool) = 0;
180 virtual void setMediaPlaybackRequiresUserGesture(bool) = 0; 189 virtual void setMediaPlaybackRequiresUserGesture(bool) = 0;
181 virtual void setPresentationRequiresUserGesture(bool) = 0; 190 virtual void setPresentationRequiresUserGesture(bool) = 0;
182 virtual void setMinimumAccelerated2dCanvasSize(int) = 0; 191 virtual void setMinimumAccelerated2dCanvasSize(int) = 0;
183 virtual void setMinimumFontSize(int) = 0; 192 virtual void setMinimumFontSize(int) = 0;
184 virtual void setMinimumLogicalFontSize(int) = 0; 193 virtual void setMinimumLogicalFontSize(int) = 0;
185 virtual void setMockScrollbarsEnabled(bool) = 0; 194 virtual void setMockScrollbarsEnabled(bool) = 0;
186 virtual void setOfflineWebApplicationCacheEnabled(bool) = 0; 195 virtual void setOfflineWebApplicationCacheEnabled(bool) = 0;
196 virtual void setPassiveEventListenerDefault(PassiveEventListenerDefault) = 0 ;
187 virtual void setPasswordEchoDurationInSeconds(double) = 0; 197 virtual void setPasswordEchoDurationInSeconds(double) = 0;
188 virtual void setPasswordEchoEnabled(bool) = 0; 198 virtual void setPasswordEchoEnabled(bool) = 0;
189 virtual void setPerTilePaintingEnabled(bool) = 0; 199 virtual void setPerTilePaintingEnabled(bool) = 0;
190 virtual void setPictographFontFamily(const WebString&, UScriptCode = USCRIPT _COMMON) = 0; 200 virtual void setPictographFontFamily(const WebString&, UScriptCode = USCRIPT _COMMON) = 0;
191 virtual void setPinchOverlayScrollbarThickness(int) = 0; 201 virtual void setPinchOverlayScrollbarThickness(int) = 0;
192 virtual void setPluginsEnabled(bool) = 0; 202 virtual void setPluginsEnabled(bool) = 0;
193 virtual void setAvailablePointerTypes(int) = 0; 203 virtual void setAvailablePointerTypes(int) = 0;
194 virtual void setPrimaryPointerType(PointerType) = 0; 204 virtual void setPrimaryPointerType(PointerType) = 0;
195 virtual void setAvailableHoverTypes(int) = 0; 205 virtual void setAvailableHoverTypes(int) = 0;
196 virtual void setPrimaryHoverType(HoverType) = 0; 206 virtual void setPrimaryHoverType(HoverType) = 0;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 virtual void setWideViewportQuirkEnabled(bool) = 0; 273 virtual void setWideViewportQuirkEnabled(bool) = 0;
264 virtual void setXSSAuditorEnabled(bool) = 0; 274 virtual void setXSSAuditorEnabled(bool) = 0;
265 275
266 protected: 276 protected:
267 ~WebSettings() { } 277 ~WebSettings() { }
268 }; 278 };
269 279
270 } // namespace blink 280 } // namespace blink
271 281
272 #endif 282 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebSettingsImpl.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698