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

Side by Side Diff: gecko-sdk/include/nsIWindowWatcher.h

Issue 20346: Version 1.8 of gecko-sdk. Downloaded from here:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « gecko-sdk/include/nsIWindowCreator.h ('k') | gecko-sdk/include/nsIX509Cert.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0 -Release/WINNT_5.2_Depend/mozilla/embedding/components/windowwatcher/public/nsIW indowWatcher.idl
3 */
4
5 #ifndef __gen_nsIWindowWatcher_h__
6 #define __gen_nsIWindowWatcher_h__
7
8
9 #ifndef __gen_nsISupports_h__
10 #include "nsISupports.h"
11 #endif
12
13 /* For IDL files that don't want to include root IDL files. */
14 #ifndef NS_NO_VTABLE
15 #define NS_NO_VTABLE
16 #endif
17 class nsIDOMWindow; /* forward declaration */
18
19 class nsIObserver; /* forward declaration */
20
21 class nsIPrompt; /* forward declaration */
22
23 class nsIAuthPrompt; /* forward declaration */
24
25 class nsISimpleEnumerator; /* forward declaration */
26
27 class nsIWebBrowserChrome; /* forward declaration */
28
29 class nsIWindowCreator; /* forward declaration */
30
31
32 /* starting interface: nsIWindowWatcher */
33 #define NS_IWINDOWWATCHER_IID_STR "002286a8-494b-43b3-8ddd-49e3fc50622b"
34
35 #define NS_IWINDOWWATCHER_IID \
36 {0x002286a8, 0x494b, 0x43b3, \
37 { 0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b }}
38
39 class NS_NO_VTABLE nsIWindowWatcher : public nsISupports {
40 public:
41
42 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWINDOWWATCHER_IID)
43
44 /** Create a new window. It will automatically be added to our list
45 (via addWindow()).
46 @param aParent parent window, if any. Null if no parent. If it is
47 impossible to get to an nsIWebBrowserChrome from aParent, this
48 method will effectively act as if aParent were null.
49 @param aURL url to which to open the new window. Must already be
50 escaped, if applicable. can be null.
51 @param aName window name from JS window.open. can be null.
52 @param aFeatures window features from JS window.open. can be null.
53 @param aArguments extra argument(s) to the new window, to be attached
54 as the |arguments| property. An nsISupportsArray will be
55 unwound into multiple arguments (but not recursively!).
56 can be null.
57 @return the new window
58 */
59 /* nsIDOMWindow openWindow (in nsIDOMWindow aParent, in string aUrl, in string aName, in string aFeatures, in nsISupports aArguments); */
60 NS_IMETHOD OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aNa me, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval) = 0;
61
62 /** Clients of this service can register themselves to be notified
63 when a window is opened or closed (added to or removed from this
64 service). This method adds an aObserver to the list of objects
65 to be notified.
66 @param aObserver the object to be notified when windows are
67 opened or closed. Its Observe method will be
68 called with the following parameters:
69
70 aObserver::Observe interprets its parameters so:
71 aSubject the window being opened or closed, sent as an nsISupports
72 which can be QIed to an nsIDOMWindow.
73 aTopic a wstring, either "domwindowopened" or "domwindowclosed".
74 someData not used.
75 */
76 /* void registerNotification (in nsIObserver aObserver); */
77 NS_IMETHOD RegisterNotification(nsIObserver *aObserver) = 0;
78
79 /** Clients of this service can register themselves to be notified
80 when a window is opened or closed (added to or removed from this
81 service). This method removes an aObserver from the list of objects
82 to be notified.
83 @param aObserver the observer to be removed.
84 */
85 /* void unregisterNotification (in nsIObserver aObserver); */
86 NS_IMETHOD UnregisterNotification(nsIObserver *aObserver) = 0;
87
88 /** Get an iterator for currently open windows in the order they were opened,
89 guaranteeing that each will be visited exactly once.
90 @return an enumerator which will itself return nsISupports objects which
91 can be QIed to an nsIDOMWindow
92 */
93 /* nsISimpleEnumerator getWindowEnumerator (); */
94 NS_IMETHOD GetWindowEnumerator(nsISimpleEnumerator **_retval) = 0;
95
96 /** Return a newly created nsIPrompt implementation.
97 @param aParent the parent window used for posing alerts. can be null.
98 @return a new nsIPrompt object
99 */
100 /* nsIPrompt getNewPrompter (in nsIDOMWindow aParent); */
101 NS_IMETHOD GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval) = 0;
102
103 /** Return a newly created nsIAuthPrompt implementation.
104 @param aParent the parent window used for posing alerts. can be null.
105 @return a new nsIAuthPrompt object
106 */
107 /* nsIAuthPrompt getNewAuthPrompter (in nsIDOMWindow aParent); */
108 NS_IMETHOD GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval) = 0;
109
110 /** Set the window creator callback. It must be filled in by the app.
111 openWindow will use it to create new windows.
112 @param creator the callback. if null, the callback will be cleared
113 and window creation capabilities lost.
114 */
115 /* void setWindowCreator (in nsIWindowCreator creator); */
116 NS_IMETHOD SetWindowCreator(nsIWindowCreator *creator) = 0;
117
118 /** Retrieve the chrome window mapped to the given DOM window. Window
119 Watcher keeps a list of all top-level DOM windows currently open,
120 along with their corresponding chrome interfaces. Since DOM Windows
121 lack a (public) means of retrieving their corresponding chrome,
122 this method will do that.
123 @param aWindow the DOM window whose chrome window the caller needs
124 @return the corresponding chrome window
125 */
126 /* nsIWebBrowserChrome getChromeForWindow (in nsIDOMWindow aWindow); */
127 NS_IMETHOD GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_re tval) = 0;
128
129 /**
130 Retrieve an existing window (or frame).
131 @param aTargetName the window name
132 @param aCurrentWindow a starting point in the window hierarchy to
133 begin the search. If null, each toplevel window
134 will be searched.
135
136 Note: This method will search all open windows for any window or
137 frame with the given window name. Make sure you understand the
138 security implications of this before using this method!
139 */
140 /* nsIDOMWindow getWindowByName (in wstring aTargetName, in nsIDOMWindow aCurr entWindow); */
141 NS_IMETHOD GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurren tWindow, nsIDOMWindow **_retval) = 0;
142
143 /** The Watcher serves as a global storage facility for the current active
144 (frontmost non-floating-palette-type) window, storing and returning
145 it on demand. Users must keep this attribute current, including after
146 the topmost window is closed. This attribute obviously can return null
147 if no windows are open, but should otherwise always return a valid
148 window.
149 */
150 /* attribute nsIDOMWindow activeWindow; */
151 NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) = 0;
152 NS_IMETHOD SetActiveWindow(nsIDOMWindow * aActiveWindow) = 0;
153
154 };
155
156 /* Use this macro when declaring classes that implement this interface. */
157 #define NS_DECL_NSIWINDOWWATCHER \
158 NS_IMETHOD OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aNa me, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval); \
159 NS_IMETHOD RegisterNotification(nsIObserver *aObserver); \
160 NS_IMETHOD UnregisterNotification(nsIObserver *aObserver); \
161 NS_IMETHOD GetWindowEnumerator(nsISimpleEnumerator **_retval); \
162 NS_IMETHOD GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval); \
163 NS_IMETHOD GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval); \
164 NS_IMETHOD SetWindowCreator(nsIWindowCreator *creator); \
165 NS_IMETHOD GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_re tval); \
166 NS_IMETHOD GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurren tWindow, nsIDOMWindow **_retval); \
167 NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow); \
168 NS_IMETHOD SetActiveWindow(nsIDOMWindow * aActiveWindow);
169
170 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
171 #define NS_FORWARD_NSIWINDOWWATCHER(_to) \
172 NS_IMETHOD OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aNa me, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval) { re turn _to OpenWindow(aParent, aUrl, aName, aFeatures, aArguments, _retval); } \
173 NS_IMETHOD RegisterNotification(nsIObserver *aObserver) { return _to RegisterN otification(aObserver); } \
174 NS_IMETHOD UnregisterNotification(nsIObserver *aObserver) { return _to Unregis terNotification(aObserver); } \
175 NS_IMETHOD GetWindowEnumerator(nsISimpleEnumerator **_retval) { return _to Get WindowEnumerator(_retval); } \
176 NS_IMETHOD GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval) { return _to GetNewPrompter(aParent, _retval); } \
177 NS_IMETHOD GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval) { return _to GetNewAuthPrompter(aParent, _retval); } \
178 NS_IMETHOD SetWindowCreator(nsIWindowCreator *creator) { return _to SetWindowC reator(creator); } \
179 NS_IMETHOD GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_re tval) { return _to GetChromeForWindow(aWindow, _retval); } \
180 NS_IMETHOD GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurren tWindow, nsIDOMWindow **_retval) { return _to GetWindowByName(aTargetName, aCurr entWindow, _retval); } \
181 NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) { return _to GetActi veWindow(aActiveWindow); } \
182 NS_IMETHOD SetActiveWindow(nsIDOMWindow * aActiveWindow) { return _to SetActiv eWindow(aActiveWindow); }
183
184 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
185 #define NS_FORWARD_SAFE_NSIWINDOWWATCHER(_to) \
186 NS_IMETHOD OpenWindow(nsIDOMWindow *aParent, const char *aUrl, const char *aNa me, const char *aFeatures, nsISupports *aArguments, nsIDOMWindow **_retval) { re turn !_to ? NS_ERROR_NULL_POINTER : _to->OpenWindow(aParent, aUrl, aName, aFeatu res, aArguments, _retval); } \
187 NS_IMETHOD RegisterNotification(nsIObserver *aObserver) { return !_to ? NS_ERR OR_NULL_POINTER : _to->RegisterNotification(aObserver); } \
188 NS_IMETHOD UnregisterNotification(nsIObserver *aObserver) { return !_to ? NS_E RROR_NULL_POINTER : _to->UnregisterNotification(aObserver); } \
189 NS_IMETHOD GetWindowEnumerator(nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWindowEnumerator(_retval); } \
190 NS_IMETHOD GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNewPrompter(aParent, _retval); } \
191 NS_IMETHOD GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuthPrompt **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNewAuthPrompter(aParent, _retval ); } \
192 NS_IMETHOD SetWindowCreator(nsIWindowCreator *creator) { return !_to ? NS_ERRO R_NULL_POINTER : _to->SetWindowCreator(creator); } \
193 NS_IMETHOD GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome **_re tval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetChromeForWindow(aWindow, _ retval); } \
194 NS_IMETHOD GetWindowByName(const PRUnichar *aTargetName, nsIDOMWindow *aCurren tWindow, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Ge tWindowByName(aTargetName, aCurrentWindow, _retval); } \
195 NS_IMETHOD GetActiveWindow(nsIDOMWindow * *aActiveWindow) { return !_to ? NS_E RROR_NULL_POINTER : _to->GetActiveWindow(aActiveWindow); } \
196 NS_IMETHOD SetActiveWindow(nsIDOMWindow * aActiveWindow) { return !_to ? NS_ER ROR_NULL_POINTER : _to->SetActiveWindow(aActiveWindow); }
197
198 #if 0
199 /* Use the code below as a template for the implementation class for this interf ace. */
200
201 /* Header file */
202 class nsWindowWatcher : public nsIWindowWatcher
203 {
204 public:
205 NS_DECL_ISUPPORTS
206 NS_DECL_NSIWINDOWWATCHER
207
208 nsWindowWatcher();
209
210 private:
211 ~nsWindowWatcher();
212
213 protected:
214 /* additional members */
215 };
216
217 /* Implementation file */
218 NS_IMPL_ISUPPORTS1(nsWindowWatcher, nsIWindowWatcher)
219
220 nsWindowWatcher::nsWindowWatcher()
221 {
222 /* member initializers and constructor code */
223 }
224
225 nsWindowWatcher::~nsWindowWatcher()
226 {
227 /* destructor code */
228 }
229
230 /* nsIDOMWindow openWindow (in nsIDOMWindow aParent, in string aUrl, in string a Name, in string aFeatures, in nsISupports aArguments); */
231 NS_IMETHODIMP nsWindowWatcher::OpenWindow(nsIDOMWindow *aParent, const char *aUr l, const char *aName, const char *aFeatures, nsISupports *aArguments, nsIDOMWind ow **_retval)
232 {
233 return NS_ERROR_NOT_IMPLEMENTED;
234 }
235
236 /* void registerNotification (in nsIObserver aObserver); */
237 NS_IMETHODIMP nsWindowWatcher::RegisterNotification(nsIObserver *aObserver)
238 {
239 return NS_ERROR_NOT_IMPLEMENTED;
240 }
241
242 /* void unregisterNotification (in nsIObserver aObserver); */
243 NS_IMETHODIMP nsWindowWatcher::UnregisterNotification(nsIObserver *aObserver)
244 {
245 return NS_ERROR_NOT_IMPLEMENTED;
246 }
247
248 /* nsISimpleEnumerator getWindowEnumerator (); */
249 NS_IMETHODIMP nsWindowWatcher::GetWindowEnumerator(nsISimpleEnumerator **_retval )
250 {
251 return NS_ERROR_NOT_IMPLEMENTED;
252 }
253
254 /* nsIPrompt getNewPrompter (in nsIDOMWindow aParent); */
255 NS_IMETHODIMP nsWindowWatcher::GetNewPrompter(nsIDOMWindow *aParent, nsIPrompt * *_retval)
256 {
257 return NS_ERROR_NOT_IMPLEMENTED;
258 }
259
260 /* nsIAuthPrompt getNewAuthPrompter (in nsIDOMWindow aParent); */
261 NS_IMETHODIMP nsWindowWatcher::GetNewAuthPrompter(nsIDOMWindow *aParent, nsIAuth Prompt **_retval)
262 {
263 return NS_ERROR_NOT_IMPLEMENTED;
264 }
265
266 /* void setWindowCreator (in nsIWindowCreator creator); */
267 NS_IMETHODIMP nsWindowWatcher::SetWindowCreator(nsIWindowCreator *creator)
268 {
269 return NS_ERROR_NOT_IMPLEMENTED;
270 }
271
272 /* nsIWebBrowserChrome getChromeForWindow (in nsIDOMWindow aWindow); */
273 NS_IMETHODIMP nsWindowWatcher::GetChromeForWindow(nsIDOMWindow *aWindow, nsIWebB rowserChrome **_retval)
274 {
275 return NS_ERROR_NOT_IMPLEMENTED;
276 }
277
278 /* nsIDOMWindow getWindowByName (in wstring aTargetName, in nsIDOMWindow aCurren tWindow); */
279 NS_IMETHODIMP nsWindowWatcher::GetWindowByName(const PRUnichar *aTargetName, nsI DOMWindow *aCurrentWindow, nsIDOMWindow **_retval)
280 {
281 return NS_ERROR_NOT_IMPLEMENTED;
282 }
283
284 /* attribute nsIDOMWindow activeWindow; */
285 NS_IMETHODIMP nsWindowWatcher::GetActiveWindow(nsIDOMWindow * *aActiveWindow)
286 {
287 return NS_ERROR_NOT_IMPLEMENTED;
288 }
289 NS_IMETHODIMP nsWindowWatcher::SetActiveWindow(nsIDOMWindow * aActiveWindow)
290 {
291 return NS_ERROR_NOT_IMPLEMENTED;
292 }
293
294 /* End of implementation class template. */
295 #endif
296
297 // {002286a8-494b-43b3-8ddd-49e3fc50622b}
298 #define NS_WINDOWWATCHER_IID \
299 {0x002286a8, 0x494b, 0x43b3, {0x8d, 0xdd, 0x49, 0xe3, 0xfc, 0x50, 0x62, 0x2b}}
300 #define NS_WINDOWWATCHER_CONTRACTID "@mozilla.org/embedcomp/window-watcher;1"
301
302 #endif /* __gen_nsIWindowWatcher_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsIWindowCreator.h ('k') | gecko-sdk/include/nsIX509Cert.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698