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

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementCallbackQueue.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 * 7 *
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 26 matching lines...) Expand all
37 #include "wtf/OwnPtr.h" 37 #include "wtf/OwnPtr.h"
38 #include "wtf/PassOwnPtr.h" 38 #include "wtf/PassOwnPtr.h"
39 #include "wtf/PassRefPtr.h" 39 #include "wtf/PassRefPtr.h"
40 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
41 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
42 42
43 namespace blink { 43 namespace blink {
44 44
45 // FIXME: Rename this because it contains resolution and upgrade as 45 // FIXME: Rename this because it contains resolution and upgrade as
46 // well as callbacks. 46 // well as callbacks.
47 class CustomElementCallbackQueue : public NoBaseWillBeGarbageCollectedFinalized< CustomElementCallbackQueue> { 47 class CustomElementCallbackQueue : public GarbageCollectedFinalized<CustomElemen tCallbackQueue> {
48 WTF_MAKE_NONCOPYABLE(CustomElementCallbackQueue); 48 WTF_MAKE_NONCOPYABLE(CustomElementCallbackQueue);
49 USING_FAST_MALLOC_WILL_BE_REMOVED(CustomElementCallbackQueue);
50 public: 49 public:
51 static PassOwnPtrWillBeRawPtr<CustomElementCallbackQueue> create(PassRefPtrW illBeRawPtr<Element>); 50 static RawPtr<CustomElementCallbackQueue> create(RawPtr<Element>);
52 51
53 typedef int ElementQueueId; 52 typedef int ElementQueueId;
54 ElementQueueId owner() const { return m_owner; } 53 ElementQueueId owner() const { return m_owner; }
55 54
56 void setOwner(ElementQueueId newOwner) 55 void setOwner(ElementQueueId newOwner)
57 { 56 {
58 // ElementCallbackQueues only migrate towards the top of the 57 // ElementCallbackQueues only migrate towards the top of the
59 // processing stack. 58 // processing stack.
60 ASSERT(newOwner >= m_owner); 59 ASSERT(newOwner >= m_owner);
61 m_owner = newOwner; 60 m_owner = newOwner;
62 } 61 }
63 62
64 bool processInElementQueue(ElementQueueId); 63 bool processInElementQueue(ElementQueueId);
65 64
66 void append(PassOwnPtrWillBeRawPtr<CustomElementProcessingStep> invocation) { m_queue.append(invocation); } 65 void append(RawPtr<CustomElementProcessingStep> invocation) { m_queue.append (invocation); }
67 bool inCreatedCallback() const { return m_inCreatedCallback; } 66 bool inCreatedCallback() const { return m_inCreatedCallback; }
68 67
69 DECLARE_TRACE(); 68 DECLARE_TRACE();
70 69
71 private: 70 private:
72 explicit CustomElementCallbackQueue(PassRefPtrWillBeRawPtr<Element>); 71 explicit CustomElementCallbackQueue(RawPtr<Element>);
73 72
74 RefPtrWillBeMember<Element> m_element; 73 Member<Element> m_element;
75 WillBeHeapVector<OwnPtrWillBeMember<CustomElementProcessingStep>> m_queue; 74 HeapVector<Member<CustomElementProcessingStep>> m_queue;
76 ElementQueueId m_owner; 75 ElementQueueId m_owner;
77 size_t m_index; 76 size_t m_index;
78 bool m_inCreatedCallback; 77 bool m_inCreatedCallback;
79 }; 78 };
80 79
81 } // namespace blink 80 } // namespace blink
82 81
83 #endif // CustomElementCallbackQueue_h 82 #endif // CustomElementCallbackQueue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698