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

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

Issue 965393002: Simplify ContextLifecycleNotifier's handling of ActiveDOMObjects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: manually count the ActiveDOMObjects instead 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ContextLifecycleNotifier.cpp ('k') | 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, int scriptId, PassR efPtrWillBeRawPtr<ScriptCallStack>, AccessControlStatus); 89 void reportException(PassRefPtrWillBeRawPtr<ErrorEvent>, int scriptId, PassR efPtrWillBeRawPtr<ScriptCallStack>, AccessControlStatus);
90 90
91 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) = 0; 91 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) = 0;
92 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) = 0; 92 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) = 0;
93 93
94 PublicURLManager& publicURLManager(); 94 PublicURLManager& publicURLManager();
95 95
96 void suspendActiveDOMObjects(); 96 void suspendActiveDOMObjects();
97 void resumeActiveDOMObjects(); 97 void resumeActiveDOMObjects();
98 void stopActiveDOMObjects(); 98 void stopActiveDOMObjects();
99 unsigned activeDOMObjectCount();
100 99
101 virtual void suspendScheduledTasks(); 100 virtual void suspendScheduledTasks();
102 virtual void resumeScheduledTasks(); 101 virtual void resumeScheduledTasks();
103 virtual bool tasksNeedSuspension() { return false; } 102 virtual bool tasksNeedSuspension() { return false; }
104 virtual void tasksWereSuspended() { } 103 virtual void tasksWereSuspended() { }
105 virtual void tasksWereResumed() { } 104 virtual void tasksWereResumed() { }
106 105
107 bool activeDOMObjectsAreSuspended() const { return m_activeDOMObjectsAreSusp ended; } 106 bool activeDOMObjectsAreSuspended() const { return m_activeDOMObjectsAreSusp ended; }
108 bool activeDOMObjectsAreStopped() const { return m_activeDOMObjectsAreStoppe d; } 107 bool activeDOMObjectsAreStopped() const { return m_activeDOMObjectsAreStoppe d; }
109 bool isIteratingOverObservers() const; 108 bool isIteratingOverObservers() const;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Counter that keeps track of how many window interaction calls are allowed 165 // Counter that keeps track of how many window interaction calls are allowed
167 // for this ExecutionContext. Callers are expected to call 166 // for this ExecutionContext. Callers are expected to call
168 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to 167 // |allowWindowInteraction()| and |consumeWindowInteraction()| in order to
169 // increment and decrement the counter. 168 // increment and decrement the counter.
170 int m_windowInteractionTokens; 169 int m_windowInteractionTokens;
171 }; 170 };
172 171
173 } // namespace blink 172 } // namespace blink
174 173
175 #endif // ExecutionContext_h 174 #endif // ExecutionContext_h
OLDNEW
« no previous file with comments | « Source/core/dom/ContextLifecycleNotifier.cpp ('k') | Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698