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

Side by Side Diff: Source/platform/LifecycleObserver.h

Issue 885483002: Oilpan: tidy up prefinalizer declarations and a registration. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « Source/modules/webmidi/MIDIAccessInitializer.cpp ('k') | no next file » | 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 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 16 matching lines...) Expand all
27 #ifndef LifecycleObserver_h 27 #ifndef LifecycleObserver_h
28 #define LifecycleObserver_h 28 #define LifecycleObserver_h
29 29
30 #include "platform/heap/Handle.h" 30 #include "platform/heap/Handle.h"
31 #include "wtf/Assertions.h" 31 #include "wtf/Assertions.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 template<typename T> 35 template<typename T>
36 class LifecycleObserver : public WillBeGarbageCollectedMixin { 36 class LifecycleObserver : public WillBeGarbageCollectedMixin {
37 // FIXME: Oilpan: Remove the pre-finalizer by moving LifecycleNotifer 37 // FIXME: Oilpan: Remove the pre-finalizer by moving LifecycleNotifier
38 // to Oilpan's heap and making LifecycleNotifer::m_observers 38 // to Oilpan's heap and making LifecycleNotifier::m_observers
39 // a hash set of weak members. 39 // a hash set of weak members.
40 #if ENABLE(OILPAN) 40 WILL_BE_USING_PRE_FINALIZER(LifecycleObserver, dispose);
41 USING_PRE_FINALIZER(LifecycleObserver, dispose);
42 #endif
43 public: 41 public:
44 typedef T Context; 42 typedef T Context;
45 43
46 enum Type { 44 enum Type {
47 ActiveDOMObjectType, 45 ActiveDOMObjectType,
48 DocumentLifecycleObserverType, 46 DocumentLifecycleObserverType,
49 GenericType, 47 GenericType,
50 PageLifecycleObserverType, 48 PageLifecycleObserverType,
51 DOMWindowLifecycleObserverType 49 DOMWindowLifecycleObserverType
52 }; 50 };
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 101
104 m_lifecycleContext = context; 102 m_lifecycleContext = context;
105 103
106 if (m_lifecycleContext) 104 if (m_lifecycleContext)
107 observerContext(m_lifecycleContext.get(), this); 105 observerContext(m_lifecycleContext.get(), this);
108 } 106 }
109 107
110 } // namespace blink 108 } // namespace blink
111 109
112 #endif // LifecycleObserver_h 110 #endif // LifecycleObserver_h
OLDNEW
« no previous file with comments | « Source/modules/webmidi/MIDIAccessInitializer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698