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

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: 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Defines user preference for text track kind. 81 // Defines user preference for text track kind.
82 enum class TextTrackKindUserPreference { 82 enum class TextTrackKindUserPreference {
83 // Display only tracks marked as default 83 // Display only tracks marked as default
84 Default, 84 Default,
85 // If available, display captions track in preferred language, else disp lay subtitles. 85 // If available, display captions track in preferred language, else disp lay subtitles.
86 Captions, 86 Captions,
87 // If available, display subtitles track in preferred language, else dis play captions. 87 // If available, display subtitles track in preferred language, else dis play captions.
88 Subtitles 88 Subtitles
89 }; 89 };
90 90
91 // Defines the default for 'passive' field used in the AddEventListenerOptio ns interface
92 // when javascript calls addEventListener.
93 enum class PassiveEventListenerDefault {
94 False, // Default of false.
95 True, // Default of true.
96 DocumentTrue, // Default of true for document level elements, false othe rwise.
97 ForceAllTrue // Force all values to be true even when specified.
98 };
99
91 // Sets value of a setting by its string identifier from Settings.in and 100 // Sets value of a setting by its string identifier from Settings.in and
92 // string representation of value. An enum's string representation is the 101 // string representation of value. An enum's string representation is the
93 // string representation of the integer value of the enum. 102 // string representation of the integer value of the enum.
94 virtual void setFromStrings(const WebString& name, const WebString& value) = 0; 103 virtual void setFromStrings(const WebString& name, const WebString& value) = 0;
95 104
96 virtual bool mainFrameResizesAreOrientationChanges() const = 0; 105 virtual bool mainFrameResizesAreOrientationChanges() const = 0;
97 virtual bool shrinksViewportContentToFit() const = 0; 106 virtual bool shrinksViewportContentToFit() const = 0;
98 virtual bool viewportEnabled() const = 0; 107 virtual bool viewportEnabled() const = 0;
99 virtual void setAccelerated2dCanvasEnabled(bool) = 0; 108 virtual void setAccelerated2dCanvasEnabled(bool) = 0;
100 virtual void setAccelerated2dCanvasMSAASampleCount(int) = 0; 109 virtual void setAccelerated2dCanvasMSAASampleCount(int) = 0;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 virtual void setMainFrameResizesAreOrientationChanges(bool) = 0; 179 virtual void setMainFrameResizesAreOrientationChanges(bool) = 0;
171 virtual void setMaxTouchPoints(int) = 0; 180 virtual void setMaxTouchPoints(int) = 0;
172 virtual void setMediaControlsOverlayPlayButtonEnabled(bool) = 0; 181 virtual void setMediaControlsOverlayPlayButtonEnabled(bool) = 0;
173 virtual void setMediaPlaybackRequiresUserGesture(bool) = 0; 182 virtual void setMediaPlaybackRequiresUserGesture(bool) = 0;
174 virtual void setPresentationRequiresUserGesture(bool) = 0; 183 virtual void setPresentationRequiresUserGesture(bool) = 0;
175 virtual void setMinimumAccelerated2dCanvasSize(int) = 0; 184 virtual void setMinimumAccelerated2dCanvasSize(int) = 0;
176 virtual void setMinimumFontSize(int) = 0; 185 virtual void setMinimumFontSize(int) = 0;
177 virtual void setMinimumLogicalFontSize(int) = 0; 186 virtual void setMinimumLogicalFontSize(int) = 0;
178 virtual void setMockScrollbarsEnabled(bool) = 0; 187 virtual void setMockScrollbarsEnabled(bool) = 0;
179 virtual void setOfflineWebApplicationCacheEnabled(bool) = 0; 188 virtual void setOfflineWebApplicationCacheEnabled(bool) = 0;
189 virtual void setPassiveEventListenerDefault(PassiveEventListenerDefault) = 0 ;
180 virtual void setPasswordEchoDurationInSeconds(double) = 0; 190 virtual void setPasswordEchoDurationInSeconds(double) = 0;
181 virtual void setPasswordEchoEnabled(bool) = 0; 191 virtual void setPasswordEchoEnabled(bool) = 0;
182 virtual void setPerTilePaintingEnabled(bool) = 0; 192 virtual void setPerTilePaintingEnabled(bool) = 0;
183 virtual void setPictographFontFamily(const WebString&, UScriptCode = USCRIPT _COMMON) = 0; 193 virtual void setPictographFontFamily(const WebString&, UScriptCode = USCRIPT _COMMON) = 0;
184 virtual void setPinchOverlayScrollbarThickness(int) = 0; 194 virtual void setPinchOverlayScrollbarThickness(int) = 0;
185 virtual void setPluginsEnabled(bool) = 0; 195 virtual void setPluginsEnabled(bool) = 0;
186 virtual void setAvailablePointerTypes(int) = 0; 196 virtual void setAvailablePointerTypes(int) = 0;
187 virtual void setPrimaryPointerType(PointerType) = 0; 197 virtual void setPrimaryPointerType(PointerType) = 0;
188 virtual void setAvailableHoverTypes(int) = 0; 198 virtual void setAvailableHoverTypes(int) = 0;
189 virtual void setPrimaryHoverType(HoverType) = 0; 199 virtual void setPrimaryHoverType(HoverType) = 0;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 virtual void setWideViewportQuirkEnabled(bool) = 0; 265 virtual void setWideViewportQuirkEnabled(bool) = 0;
256 virtual void setXSSAuditorEnabled(bool) = 0; 266 virtual void setXSSAuditorEnabled(bool) = 0;
257 267
258 protected: 268 protected:
259 ~WebSettings() { } 269 ~WebSettings() { }
260 }; 270 };
261 271
262 } // namespace blink 272 } // namespace blink
263 273
264 #endif 274 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698