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

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

Issue 194923007: Explicit notification and removal of lifecycle observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Perform ThreadState detachment last Created 6 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 virtual void removeObserver(Observer*) OVERRIDE; 52 virtual void removeObserver(Observer*) OVERRIDE;
53 53
54 void notifyResumingActiveDOMObjects(); 54 void notifyResumingActiveDOMObjects();
55 void notifySuspendingActiveDOMObjects(); 55 void notifySuspendingActiveDOMObjects();
56 void notifyWillStopActiveDOMObjects(); 56 void notifyWillStopActiveDOMObjects();
57 void notifyStoppingActiveDOMObjects(); 57 void notifyStoppingActiveDOMObjects();
58 58
59 bool contains(ActiveDOMObject* object) const { return m_activeDOMObjects.con tains(object); } 59 bool contains(ActiveDOMObject* object) const { return m_activeDOMObjects.con tains(object); }
60 bool hasPendingActivity() const; 60 bool hasPendingActivity() const;
61 61
62 virtual void removeAndNotifyAllObservers() OVERRIDE;
63
62 protected: 64 protected:
63 explicit ContextLifecycleNotifier(ExecutionContext*); 65 explicit ContextLifecycleNotifier(ExecutionContext*);
64 66
65 private: 67 private:
66 ActiveDOMObjectSet m_activeDOMObjects; 68 ActiveDOMObjectSet m_activeDOMObjects;
67 }; 69 };
68 70
69 inline PassOwnPtr<ContextLifecycleNotifier> ContextLifecycleNotifier::create(Exe cutionContext* context) 71 inline PassOwnPtr<ContextLifecycleNotifier> ContextLifecycleNotifier::create(Exe cutionContext* context)
70 { 72 {
71 return adoptPtr(new ContextLifecycleNotifier(context)); 73 return adoptPtr(new ContextLifecycleNotifier(context));
72 } 74 }
73 75
74 } // namespace WebCore 76 } // namespace WebCore
75 77
76 #endif // ContextLifecycleNotifier_h 78 #endif // ContextLifecycleNotifier_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ContextLifecycleNotifier.cpp » ('j') | Source/platform/LifecycleNotifier.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698