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

Side by Side Diff: Source/core/dom/ExecutionContext.h

Issue 1009623002: Remove ExecutionContext::lifecycleNotifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2012 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void stopActiveDOMObjects(); 98 void stopActiveDOMObjects();
99 99
100 virtual void suspendScheduledTasks(); 100 virtual void suspendScheduledTasks();
101 virtual void resumeScheduledTasks(); 101 virtual void resumeScheduledTasks();
102 virtual bool tasksNeedSuspension() { return false; } 102 virtual bool tasksNeedSuspension() { return false; }
103 virtual void tasksWereSuspended() { } 103 virtual void tasksWereSuspended() { }
104 virtual void tasksWereResumed() { } 104 virtual void tasksWereResumed() { }
105 105
106 bool activeDOMObjectsAreSuspended() const { return m_activeDOMObjectsAreSusp ended; } 106 bool activeDOMObjectsAreSuspended() const { return m_activeDOMObjectsAreSusp ended; }
107 bool activeDOMObjectsAreStopped() const { return m_activeDOMObjectsAreStoppe d; } 107 bool activeDOMObjectsAreStopped() const { return m_activeDOMObjectsAreStoppe d; }
108 bool isIteratingOverObservers() const;
109 108
110 // Called after the construction of an ActiveDOMObject to synchronize suspen d state. 109 // Called after the construction of an ActiveDOMObject to synchronize suspen d state.
111 void suspendActiveDOMObjectIfNeeded(ActiveDOMObject*); 110 void suspendActiveDOMObjectIfNeeded(ActiveDOMObject*);
112 #if !ENABLE(OILPAN) 111 #if !ENABLE(OILPAN)
113 void ref() { refExecutionContext(); } 112 void ref() { refExecutionContext(); }
114 void deref() { derefExecutionContext(); } 113 void deref() { derefExecutionContext(); }
115 #endif 114 #endif
116 115
117 // Gets the next id in a circular sequence from 1 to 2^31-1. 116 // Gets the next id in a circular sequence from 1 to 2^31-1.
118 int circularSequentialID(); 117 int circularSequentialID();
(...skipping 10 matching lines...) Expand all
129 void consumeWindowInteraction(); 128 void consumeWindowInteraction();
130 bool isWindowInteractionAllowed() const; 129 bool isWindowInteractionAllowed() const;
131 130
132 protected: 131 protected:
133 ExecutionContext(); 132 ExecutionContext();
134 virtual ~ExecutionContext(); 133 virtual ~ExecutionContext();
135 134
136 virtual const KURL& virtualURL() const = 0; 135 virtual const KURL& virtualURL() const = 0;
137 virtual KURL virtualCompleteURL(const String&) const = 0; 136 virtual KURL virtualCompleteURL(const String&) const = 0;
138 137
139 ContextLifecycleNotifier& lifecycleNotifier();
140
141 private: 138 private:
142 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus); 139 bool dispatchErrorEvent(PassRefPtrWillBeRawPtr<ErrorEvent>, AccessControlSta tus);
143 140
144 #if !ENABLE(OILPAN) 141 #if !ENABLE(OILPAN)
145 virtual void refExecutionContext() = 0; 142 virtual void refExecutionContext() = 0;
146 virtual void derefExecutionContext() = 0; 143 virtual void derefExecutionContext() = 0;
147 #endif 144 #endif
148 // LifecycleContext implementation. 145 // LifecycleContext implementation.
149 146
150 int m_circularSequentialID; 147 int m_circularSequentialID;
151 148
152 bool m_inDispatchErrorEvent; 149 bool m_inDispatchErrorEvent;
153 class PendingException; 150 class PendingException;
154 OwnPtrWillBeMember<WillBeHeapVector<OwnPtrWillBeMember<PendingException> > > m_pendingExceptions; 151 OwnPtrWillBeMember<WillBeHeapVector<OwnPtrWillBeMember<PendingException> > > m_pendingExceptions;
155 152
156 bool m_activeDOMObjectsAreSuspended; 153 bool m_activeDOMObjectsAreSuspended;
157 bool m_activeDOMObjectsAreStopped; 154 bool m_activeDOMObjectsAreStopped;
158 155
159 OwnPtrWillBeMember<PublicURLManager> m_publicURLManager; 156 OwnPtrWillBeMember<PublicURLManager> m_publicURLManager;
160 157
161 bool m_strictMixedContentCheckingEnforced; 158 bool m_strictMixedContentCheckingEnforced;
162 159
163 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier;
164
165 // Counter that keeps track of how many window interaction calls are allowed 160 // Counter that keeps track of how many window interaction calls are allowed
166 // for this ExecutionContext. Callers are expected to call 161 // for this ExecutionContext. Callers are expected to call
167 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to 162 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to
168 // increment and decrement the counter. 163 // increment and decrement the counter.
169 int m_windowInteractionTokens; 164 int m_windowInteractionTokens;
170 }; 165 };
171 166
172 } // namespace blink 167 } // namespace blink
173 168
174 #endif // ExecutionContext_h 169 #endif // ExecutionContext_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698