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

Side by Side Diff: gecko-sdk/include/nsIProfileChangeStatus.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/nsIProfile.h ('k') | gecko-sdk/include/nsIProgrammingLanguage.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/profile/public/nsIProfileChangeStatus.idl
3 */
4
5 #ifndef __gen_nsIProfileChangeStatus_h__
6 #define __gen_nsIProfileChangeStatus_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 /**
18 * nsIObserver topics for profile changing. Profile changing happens in phase s
19 * in the order given below. An observer may register separately for each pha se
20 * of the process depending on its needs. The subject passed to the observer' s
21 * Observe() method can be QI'd to an nsIProfileChangeStatus.
22 *
23 * "profile-approve-change"
24 * Called before a profile change is attempted. Typically,
25 * the application level observer will ask the user if
26 * he/she wants to stop all network activity, close all open
27 * windows, etc. If the user says NO, the observer should
28 * call the subject's vetoChange(). If any observer does
29 * this, the profile will not be changed.
30 *
31 * "profile-change-teardown"
32 * All async activity must be stopped in this phase. Typically,
33 * the application level observer will close all open windows.
34 * This is the last phase in which the subject's vetoChange()
35 * method may still be called.
36 * The next notification will be either
37 * profile-change-teardown-veto or profile-before-change.
38 *
39 * "profile-change-teardown-veto"
40 * This notification will only be sent, if the profile change
41 * was vetoed during the profile-change-teardown phase.
42 * This allows components to bring back required resources,
43 * that were tore down on profile-change-teardown.
44 *
45 * "profile-before-change"
46 * Called before the profile has changed. Use this notification
47 * to prepare for the profile going away. If a component is
48 * holding any state which needs to be flushed to a profile-relative
49 * location, it should be done here.
50 *
51 * "profile-do-change"
52 * Called after the profile has changed. Do the work to
53 * respond to having a new profile. Any change which
54 * affects others must be done in this phase.
55 *
56 * "profile-after-change"
57 * Called after the profile has changed. Use this notification
58 * to make changes that are dependent on what some other listener
59 * did during its profile-do-change. For example, to respond to
60 * new preferences.
61 *
62 * "profile-initial-state"
63 * Called after all phases of a change have completed. Typically
64 * in this phase, an application level observer will open a new window.
65 *
66 * Contexts for profile changes. These are passed as the someData param to th e
67 * observer's Observe() method.
68
69 * "startup"
70 * Going from no profile to a profile.
71 *
72 * The following topics happen in this context:
73 * profile-do-change
74 * profile-after-change
75 *
76 * "shutdown-persist"
77 * The user is logging out and whatever data the observer stores
78 * for the current profile should be released from memory and
79 * saved to disk.
80 *
81 * "shutdown-cleanse"
82 * The user is logging out and whatever data the observer stores
83 * for the current profile should be released from memory and
84 * deleted from disk.
85 *
86 * The following topics happen in both shutdown contexts:
87 * profile-approve-change
88 * profile-change-teardown
89 * profile-before-change
90 *
91 * "switch"
92 * Going from one profile to another.
93 *
94 * All of the above topics happen in a profile switch.
95 *
96 */
97
98 /* starting interface: nsIProfileChangeStatus */
99 #define NS_IPROFILECHANGESTATUS_IID_STR "2f977d43-5485-11d4-87e2-0010a4e75ef2"
100
101 #define NS_IPROFILECHANGESTATUS_IID \
102 {0x2f977d43, 0x5485, 0x11d4, \
103 { 0x87, 0xe2, 0x00, 0x10, 0xa4, 0xe7, 0x5e, 0xf2 }}
104
105 class NS_NO_VTABLE nsIProfileChangeStatus : public nsISupports {
106 public:
107
108 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROFILECHANGESTATUS_IID)
109
110 /* void vetoChange (); */
111 NS_IMETHOD VetoChange(void) = 0;
112
113 /**
114 * Called by a profile change observer when a fatal error
115 * occurred during the attempt to switch the profile.
116 *
117 * The profile should be considered in an unsafe condition,
118 * and the profile manager should inform the user and
119 * exit immediately.
120 *
121 */
122 /* void changeFailed (); */
123 NS_IMETHOD ChangeFailed(void) = 0;
124
125 };
126
127 /* Use this macro when declaring classes that implement this interface. */
128 #define NS_DECL_NSIPROFILECHANGESTATUS \
129 NS_IMETHOD VetoChange(void); \
130 NS_IMETHOD ChangeFailed(void);
131
132 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
133 #define NS_FORWARD_NSIPROFILECHANGESTATUS(_to) \
134 NS_IMETHOD VetoChange(void) { return _to VetoChange(); } \
135 NS_IMETHOD ChangeFailed(void) { return _to ChangeFailed(); }
136
137 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
138 #define NS_FORWARD_SAFE_NSIPROFILECHANGESTATUS(_to) \
139 NS_IMETHOD VetoChange(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->VetoC hange(); } \
140 NS_IMETHOD ChangeFailed(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Cha ngeFailed(); }
141
142 #if 0
143 /* Use the code below as a template for the implementation class for this interf ace. */
144
145 /* Header file */
146 class nsProfileChangeStatus : public nsIProfileChangeStatus
147 {
148 public:
149 NS_DECL_ISUPPORTS
150 NS_DECL_NSIPROFILECHANGESTATUS
151
152 nsProfileChangeStatus();
153
154 private:
155 ~nsProfileChangeStatus();
156
157 protected:
158 /* additional members */
159 };
160
161 /* Implementation file */
162 NS_IMPL_ISUPPORTS1(nsProfileChangeStatus, nsIProfileChangeStatus)
163
164 nsProfileChangeStatus::nsProfileChangeStatus()
165 {
166 /* member initializers and constructor code */
167 }
168
169 nsProfileChangeStatus::~nsProfileChangeStatus()
170 {
171 /* destructor code */
172 }
173
174 /* void vetoChange (); */
175 NS_IMETHODIMP nsProfileChangeStatus::VetoChange()
176 {
177 return NS_ERROR_NOT_IMPLEMENTED;
178 }
179
180 /* void changeFailed (); */
181 NS_IMETHODIMP nsProfileChangeStatus::ChangeFailed()
182 {
183 return NS_ERROR_NOT_IMPLEMENTED;
184 }
185
186 /* End of implementation class template. */
187 #endif
188
189
190 #endif /* __gen_nsIProfileChangeStatus_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsIProfile.h ('k') | gecko-sdk/include/nsIProgrammingLanguage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698