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

Side by Side Diff: third_party/WebKit/Source/core/frame/Window.idl

Issue 2526943002: Add use counters for lots of DOM APIs.
Patch Set: Add use counters for lots of DOM APIs. Created 4 years 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) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 19 matching lines...) Expand all
30 [ 30 [
31 CheckSecurity=Receiver, 31 CheckSecurity=Receiver,
32 ImplementedAs=DOMWindow, 32 ImplementedAs=DOMWindow,
33 PrimaryGlobal, 33 PrimaryGlobal,
34 ] interface Window : EventTarget { 34 ] interface Window : EventTarget {
35 // the current browsing context 35 // the current browsing context
36 // FIXME: The spec uses the WindowProxy type for this and many other attribu tes. 36 // FIXME: The spec uses the WindowProxy type for this and many other attribu tes.
37 [Unforgeable, CallWith=ScriptState, CrossOrigin] readonly attribute Window w indow; 37 [Unforgeable, CallWith=ScriptState, CrossOrigin] readonly attribute Window w indow;
38 [Replaceable, CallWith=ScriptState, CrossOrigin] readonly attribute Window s elf; 38 [Replaceable, CallWith=ScriptState, CrossOrigin] readonly attribute Window s elf;
39 [Unforgeable, CachedAccessor] readonly attribute Document document; 39 [Unforgeable, CachedAccessor] readonly attribute Document document;
40 attribute DOMString name; 40 [Measure] attribute DOMString name;
41 [PutForwards=href, Unforgeable, CrossOrigin=(Getter,Setter)] readonly attrib ute Location location; 41 [PutForwards=href, Unforgeable, CrossOrigin=(Getter,Setter)] readonly attrib ute Location location;
42 readonly attribute History history; 42 readonly attribute History history;
43 [Replaceable, MeasureAs=BarPropLocationbar] readonly attribute BarProp locat ionbar; 43 [Replaceable, MeasureAs=BarPropLocationbar] readonly attribute BarProp locat ionbar;
44 [Replaceable, MeasureAs=BarPropMenubar] readonly attribute BarProp menubar; 44 [Replaceable, MeasureAs=BarPropMenubar] readonly attribute BarProp menubar;
45 [Replaceable, MeasureAs=BarPropPersonalbar] readonly attribute BarProp perso nalbar; 45 [Replaceable, MeasureAs=BarPropPersonalbar] readonly attribute BarProp perso nalbar;
46 [Replaceable, MeasureAs=BarPropScrollbars] readonly attribute BarProp scroll bars; 46 [Replaceable, MeasureAs=BarPropScrollbars] readonly attribute BarProp scroll bars;
47 [Replaceable, MeasureAs=BarPropStatusbar] readonly attribute BarProp statusb ar; 47 [Replaceable, MeasureAs=BarPropStatusbar] readonly attribute BarProp statusb ar;
48 [Replaceable, MeasureAs=BarPropToolbar] readonly attribute BarProp toolbar; 48 [Replaceable, MeasureAs=BarPropToolbar] readonly attribute BarProp toolbar;
49 attribute DOMString status; 49 attribute DOMString status;
50 [CrossOrigin, CallWith=ExecutionContext] void close(); 50 [Measure, CrossOrigin, CallWith=ExecutionContext] void close();
51 [CrossOrigin] readonly attribute boolean closed; 51 [Measure, CrossOrigin] readonly attribute boolean closed;
52 void stop(); 52 [Measure] void stop();
53 [CrossOrigin, CallWith=ExecutionContext] void focus(); 53 [Measure, CrossOrigin, CallWith=ExecutionContext] void focus();
54 [CrossOrigin] void blur(); 54 [Measure, CrossOrigin] void blur();
55 55
56 // other browsing contexts 56 // other browsing contexts
57 [Replaceable, CallWith=ScriptState, CrossOrigin] readonly attribute Window f rames; 57 [Measure, Replaceable, CallWith=ScriptState, CrossOrigin] readonly attribute Window frames;
58 [Replaceable, CrossOrigin] readonly attribute unsigned long length; 58 [Measure, Replaceable, CrossOrigin] readonly attribute unsigned long length;
59 [Unforgeable, CrossOrigin] readonly attribute Window? top; 59 [Measure, Unforgeable, CrossOrigin] readonly attribute Window? top;
60 // FIXME: opener should be of type any. 60 // FIXME: opener should be of type any.
61 [CrossOrigin, Custom=Setter] attribute Window opener; 61 [Measure, CrossOrigin, Custom=Setter] attribute Window opener;
62 [Replaceable, CrossOrigin] readonly attribute Window? parent; 62 [Measure, Replaceable, CrossOrigin] readonly attribute Window? parent;
63 [CheckSecurity=ReturnValue, Custom=Getter] readonly attribute Element? frame Element; 63 [CheckSecurity=ReturnValue, Custom=Getter] readonly attribute Element? frame Element;
64 // FIXME: open() should have 4 optional arguments with defaults. 64 // FIXME: open() should have 4 optional arguments with defaults.
65 [Custom] Window? open(DOMString url, DOMString target, optional DOMString fe atures); 65 [Measure, Custom] Window? open(DOMString url, DOMString target, optional DOM String features);
66 // FIXME: These getters should not have [NotEnumerable]. 66 // FIXME: These getters should not have [NotEnumerable].
67 [NotEnumerable, CrossOrigin] getter Window (unsigned long index); 67 [Measure, NotEnumerable, CrossOrigin] getter Window (unsigned long index);
68 [Custom, NotEnumerable, CrossOrigin] getter object (DOMString name); 68 [Measure, Custom, NotEnumerable, CrossOrigin] getter object (DOMString name) ;
69 69
70 // the user agent 70 // the user agent
71 [LogActivity=GetterOnly] readonly attribute Navigator navigator; 71 [LogActivity=GetterOnly] readonly attribute Navigator navigator;
72 [LogActivity=GetterOnly] readonly attribute ApplicationCache applicationCach e; 72 [Measure, LogActivity=GetterOnly] readonly attribute ApplicationCache applic ationCache;
73 73
74 // user prompts 74 // user prompts
75 [Measure, CallWith=ScriptState] void alert(); 75 [Measure, CallWith=ScriptState] void alert();
76 [Measure, CallWith=ScriptState] void alert(DOMString message); 76 [Measure, CallWith=ScriptState] void alert(DOMString message);
77 [Measure, CallWith=ScriptState] boolean confirm(optional DOMString message = ""); 77 [Measure, CallWith=ScriptState] boolean confirm(optional DOMString message = "");
78 [Measure, CallWith=ScriptState] DOMString? prompt(optional DOMString message = "", optional DOMString defaultValue = ""); 78 [Measure, CallWith=ScriptState] DOMString? prompt(optional DOMString message = "", optional DOMString defaultValue = "");
79 [Measure, CallWith=ScriptState] void print(); 79 [Measure, CallWith=ScriptState] void print();
80 80
81 [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(Frame RequestCallback callback); 81 [MeasureAs=UnprefixedRequestAnimationFrame] long requestAnimationFrame(Frame RequestCallback callback);
82 void cancelAnimationFrame(long handle); 82 void cancelAnimationFrame(long handle);
83 83
84 [Measure] long requestIdleCallback(IdleRequestCallback callback, optional Id leRequestOptions options); 84 [Measure] long requestIdleCallback(IdleRequestCallback callback, optional Id leRequestOptions options);
85 void cancelIdleCallback(long handle); 85 [Measure] void cancelIdleCallback(long handle);
86 86
87 [CrossOrigin, Custom, RaisesException] void postMessage(any message, DOMStri ng targetOrigin, optional sequence<Transferable> transfer); 87 [Measure, CrossOrigin, Custom, RaisesException] void postMessage(any message , DOMString targetOrigin, optional sequence<Transferable> transfer);
88 88
89 // Custom elements 89 // Custom elements
90 // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-api 90 // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-api
91 [RuntimeEnabled=CustomElementsV1, CallWith=ScriptState] readonly attribute C ustomElementRegistry customElements; 91 [Measure, RuntimeEnabled=CustomElementsV1, CallWith=ScriptState] readonly at tribute CustomElementRegistry customElements;
92 92
93 // HTML obsolete features 93 // HTML obsolete features
94 // https://html.spec.whatwg.org/#Window-partial 94 // https://html.spec.whatwg.org/#Window-partial
95 [MeasureAs=WindowCaptureEvents] void captureEvents(); 95 [MeasureAs=WindowCaptureEvents] void captureEvents();
96 [MeasureAs=WindowReleaseEvents] void releaseEvents(); 96 [MeasureAs=WindowReleaseEvents] void releaseEvents();
97 97
98 [Replaceable, SameObject] readonly attribute External external; 98 [Measure, Replaceable, SameObject] readonly attribute External external;
99 99
100 // CSS Object Model (CSSOM) 100 // CSS Object Model (CSSOM)
101 // https://dev.w3.org/csswg/cssom/#extensions-to-the-window-interface 101 // https://dev.w3.org/csswg/cssom/#extensions-to-the-window-interface
102 // FIXME: The optional pseudoElt argument should have no default. 102 // FIXME: The optional pseudoElt argument should have no default.
103 [NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMSt ring? pseudoElt = null); 103 [NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional DOMSt ring? pseudoElt = null);
104 104
105 // CSSOM View Module 105 // CSSOM View Module
106 // https://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface 106 // https://dev.w3.org/csswg/cssom-view/#extensions-to-the-window-interface
107 [NewObject] MediaQueryList matchMedia(DOMString query); 107 [NewObject] MediaQueryList matchMedia(DOMString query);
108 [SameObject, Replaceable] readonly attribute Screen screen; 108 [SameObject, Replaceable] readonly attribute Screen screen;
(...skipping 26 matching lines...) Expand all
135 135
136 // client 136 // client
137 [Replaceable] readonly attribute long screenX; 137 [Replaceable] readonly attribute long screenX;
138 [Replaceable] readonly attribute long screenY; 138 [Replaceable] readonly attribute long screenY;
139 [Replaceable] readonly attribute long outerWidth; 139 [Replaceable] readonly attribute long outerWidth;
140 [Replaceable] readonly attribute long outerHeight; 140 [Replaceable] readonly attribute long outerHeight;
141 [Replaceable] readonly attribute double devicePixelRatio; 141 [Replaceable] readonly attribute double devicePixelRatio;
142 142
143 // Selection API 143 // Selection API
144 // https://w3c.github.io/selection-api/#extensions-to-window-interface 144 // https://w3c.github.io/selection-api/#extensions-to-window-interface
145 Selection? getSelection(); 145 [Measure] Selection? getSelection();
146 146
147 // Console API 147 // Console API
148 // https://console.spec.whatwg.org/#console-interface 148 // https://console.spec.whatwg.org/#console-interface
149 // [Replaceable] readonly attribute Console console; 149 // [Replaceable] readonly attribute Console console;
150 // Console is installed by v8 inspector when context is created 150 // Console is installed by v8 inspector when context is created
151 // and is left commented here just for documentation. 151 // and is left commented here just for documentation.
152 152
153 // Non-standard APIs 153 // Non-standard APIs
154 [MeasureAs=WindowClientInformation, Replaceable] readonly attribute Navigato r clientInformation; 154 [MeasureAs=WindowClientInformation, Replaceable] readonly attribute Navigato r clientInformation;
155 [MeasureAs=WindowEvent, Custom, NotEnumerable] attribute Event event; 155 [MeasureAs=WindowEvent, Custom, NotEnumerable] attribute Event event;
(...skipping 17 matching lines...) Expand all
173 // 90 is when rotated counter clockwise. 173 // 90 is when rotated counter clockwise.
174 [MeasureAs=WindowOrientation, RuntimeEnabled=OrientationEvent] readonly attr ibute long orientation; 174 [MeasureAs=WindowOrientation, RuntimeEnabled=OrientationEvent] readonly attr ibute long orientation;
175 [DeprecateAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame (FrameRequestCallback callback); 175 [DeprecateAs=PrefixedRequestAnimationFrame] long webkitRequestAnimationFrame (FrameRequestCallback callback);
176 [DeprecateAs=PrefixedCancelAnimationFrame, ImplementedAs=cancelAnimationFram e] void webkitCancelAnimationFrame(long id); 176 [DeprecateAs=PrefixedCancelAnimationFrame, ImplementedAs=cancelAnimationFram e] void webkitCancelAnimationFrame(long id);
177 [MeasureAs=PrefixedTransitionEventConstructor] attribute TransitionEventCons tructor WebKitTransitionEvent; 177 [MeasureAs=PrefixedTransitionEventConstructor] attribute TransitionEventCons tructor WebKitTransitionEvent;
178 [Measure] attribute AnimationEventConstructor WebKitAnimationEvent; 178 [Measure] attribute AnimationEventConstructor WebKitAnimationEvent;
179 [DeprecateAs=PrefixedWindowURL] attribute URLConstructor webkitURL; 179 [DeprecateAs=PrefixedWindowURL] attribute URLConstructor webkitURL;
180 [MeasureAs=PrefixedMutationObserverConstructor] attribute MutationObserverCo nstructor WebKitMutationObserver; 180 [MeasureAs=PrefixedMutationObserverConstructor] attribute MutationObserverCo nstructor WebKitMutationObserver;
181 181
182 // Event handler attributes 182 // Event handler attributes
183 attribute EventHandler onanimationend; 183 [Measure] attribute EventHandler onanimationend;
184 attribute EventHandler onanimationiteration; 184 [Measure] attribute EventHandler onanimationiteration;
185 attribute EventHandler onanimationstart; 185 [Measure] attribute EventHandler onanimationstart;
186 [RuntimeEnabled=OrientationEvent] attribute EventHandler onorientationchange ; 186 [Measure, RuntimeEnabled=OrientationEvent] attribute EventHandler onorientat ionchange;
187 attribute EventHandler onsearch; 187 [Measure] attribute EventHandler onsearch;
188 attribute EventHandler ontransitionend; 188 [Measure] attribute EventHandler ontransitionend;
189 attribute EventHandler onwebkitanimationend; 189 [Measure] attribute EventHandler onwebkitanimationend;
190 attribute EventHandler onwebkitanimationiteration; 190 [Measure] attribute EventHandler onwebkitanimationiteration;
191 attribute EventHandler onwebkitanimationstart; 191 [Measure] attribute EventHandler onwebkitanimationstart;
192 attribute EventHandler onwebkittransitionend; 192 [Measure] attribute EventHandler onwebkittransitionend;
193 attribute EventHandler onwheel; 193 [Measure] attribute EventHandler onwheel;
194 194
195 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#monkey-patching-g lobal-object 195 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#monkey-patching-g lobal-object
196 readonly attribute boolean isSecureContext; 196 [Measure] readonly attribute boolean isSecureContext;
197 }; 197 };
198 198
199 // https://html.spec.whatwg.org/#transferable-objects 199 // https://html.spec.whatwg.org/#transferable-objects
200 // 200 //
201 // Expressing the Transferable typedef in IDL depends on https://crbug.com/24017 6. 201 // Expressing the Transferable typedef in IDL depends on https://crbug.com/24017 6.
202 // The postMessage() methods taking a Transferable array argument have custom 202 // The postMessage() methods taking a Transferable array argument have custom
203 // binding code that is able to handle the Transferables that we currently 203 // binding code that is able to handle the Transferables that we currently
204 // recognize. To be able to declare a postMessage() signature that matches 204 // recognize. To be able to declare a postMessage() signature that matches
205 // the implementation, we provide a Transferable typedef but with an 205 // the implementation, we provide a Transferable typedef but with an
206 // incomplete type. 206 // incomplete type.
207 // 207 //
208 // FIXME: make this typedef accurate once enough of https://crbug.com/240176 208 // FIXME: make this typedef accurate once enough of https://crbug.com/240176
209 // is in place. 209 // is in place.
210 // FIXME: consider putting this typedef in an .idl file containing spec-wide 210 // FIXME: consider putting this typedef in an .idl file containing spec-wide
211 // utility type definitions. 211 // utility type definitions.
212 typedef MessagePort Transferable; 212 typedef MessagePort Transferable;
213 213
214 Window implements GlobalEventHandlers; 214 Window implements GlobalEventHandlers;
215 Window implements WindowBase64; 215 Window implements WindowBase64;
216 Window implements WindowEventHandlers; 216 Window implements WindowEventHandlers;
217 Window implements WindowTimers; 217 Window implements WindowTimers;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/core/frame/WindowEventHandlers.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698