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

Side by Side Diff: Source/core/dom/ContextLifecycleNotifier.cpp

Issue 1008113002: Remove LifecycleNotifier<>::m_context. (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 | « Source/core/dom/ContextLifecycleNotifier.h ('k') | Source/core/dom/ContextLifecycleObserver.h » ('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) 2013 Google Inc. All Rights Reserved. 3 * Copyright (C) 2013 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 15 matching lines...) Expand all
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 #include "core/dom/ContextLifecycleNotifier.h" 29 #include "core/dom/ContextLifecycleNotifier.h"
30 30
31 #include "core/dom/ActiveDOMObject.h" 31 #include "core/dom/ActiveDOMObject.h"
32 #include "wtf/TemporaryChange.h" 32 #include "wtf/TemporaryChange.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 ContextLifecycleNotifier::ContextLifecycleNotifier(ExecutionContext* context)
37 : LifecycleNotifier<ExecutionContext, ContextLifecycleObserver>(context)
38 {
39 }
40
41 void ContextLifecycleNotifier::addObserver(ContextLifecycleObserver* observer) 36 void ContextLifecycleNotifier::addObserver(ContextLifecycleObserver* observer)
42 { 37 {
43 LifecycleNotifier<ExecutionContext, ContextLifecycleObserver>::addObserver(o bserver); 38 LifecycleNotifier<ExecutionContext, ContextLifecycleObserver>::addObserver(o bserver);
44 if (observer->observerType() == ContextLifecycleObserver::ActiveDOMObjectTyp e) 39 if (observer->observerType() == ContextLifecycleObserver::ActiveDOMObjectTyp e)
45 RELEASE_ASSERT(m_iterating != IteratingOverActiveDOMObjects); 40 RELEASE_ASSERT(m_iterating != IteratingOverActiveDOMObjects);
46 } 41 }
47 42
48 void ContextLifecycleNotifier::notifyResumingActiveDOMObjects() 43 void ContextLifecycleNotifier::notifyResumingActiveDOMObjects()
49 { 44 {
50 TemporaryChange<IterationType> scope(m_iterating, IteratingOverActiveDOMObje cts); 45 TemporaryChange<IterationType> scope(m_iterating, IteratingOverActiveDOMObje cts);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 continue; 132 continue;
138 ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observe r); 133 ActiveDOMObject* activeDOMObject = static_cast<ActiveDOMObject*>(observe r);
139 if (activeDOMObject == object) 134 if (activeDOMObject == object)
140 return true; 135 return true;
141 } 136 }
142 return false; 137 return false;
143 } 138 }
144 #endif 139 #endif
145 140
146 } // namespace blink 141 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/ContextLifecycleNotifier.h ('k') | Source/core/dom/ContextLifecycleObserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698