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

Side by Side Diff: third_party/WebKit/Source/core/dom/PendingScript.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, 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 * 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 27 matching lines...) Expand all
38 namespace blink { 38 namespace blink {
39 39
40 class Element; 40 class Element;
41 class ScriptSourceCode; 41 class ScriptSourceCode;
42 42
43 // A container for an external script which may be loaded and executed. 43 // A container for an external script which may be loaded and executed.
44 // 44 //
45 // A RefPtr alone does not prevent the underlying Resource 45 // A RefPtr alone does not prevent the underlying Resource
46 // from purging its data buffer. This class holds a dummy client open for its 46 // from purging its data buffer. This class holds a dummy client open for its
47 // lifetime in order to guarantee that the data buffer will not be purged. 47 // lifetime in order to guarantee that the data buffer will not be purged.
48 class CORE_EXPORT PendingScript final : public NoBaseWillBeGarbageCollectedFinal ized<PendingScript>, public ResourceOwner<ScriptResource> { 48 class CORE_EXPORT PendingScript final : public GarbageCollectedFinalized<Pending Script>, public ResourceOwner<ScriptResource> {
49 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(PendingScript); 49 USING_GARBAGE_COLLECTED_MIXIN(PendingScript);
50 WILL_BE_USING_PRE_FINALIZER(PendingScript, dispose); 50 USING_PRE_FINALIZER(PendingScript, dispose);
51 public: 51 public:
52 static PassOwnPtrWillBeRawPtr<PendingScript> create(Element*, ScriptResource *); 52 static RawPtr<PendingScript> create(Element*, ScriptResource*);
53 ~PendingScript() override; 53 ~PendingScript() override;
54 54
55 PendingScript& operator=(const PendingScript&); 55 PendingScript& operator=(const PendingScript&);
56 56
57 TextPosition startingPosition() const { return m_startingPosition; } 57 TextPosition startingPosition() const { return m_startingPosition; }
58 void setStartingPosition(const TextPosition& position) { m_startingPosition = position; } 58 void setStartingPosition(const TextPosition& position) { m_startingPosition = position; }
59 59
60 void watchForLoad(ScriptResourceClient*); 60 void watchForLoad(ScriptResourceClient*);
61 void stopWatchingForLoad(); 61 void stopWatchingForLoad();
62 62
63 Element* element() const { return m_element.get(); } 63 Element* element() const { return m_element.get(); }
64 void setElement(Element*); 64 void setElement(Element*);
65 PassRefPtrWillBeRawPtr<Element> releaseElementAndClear(); 65 RawPtr<Element> releaseElementAndClear();
66 66
67 void setScriptResource(ScriptResource*); 67 void setScriptResource(ScriptResource*);
68 68
69 void notifyFinished(Resource*) override; 69 void notifyFinished(Resource*) override;
70 String debugName() const override { return "PendingScript"; } 70 String debugName() const override { return "PendingScript"; }
71 void notifyAppendData(ScriptResource*) override; 71 void notifyAppendData(ScriptResource*) override;
72 72
73 DECLARE_TRACE(); 73 DECLARE_TRACE();
74 74
75 ScriptSourceCode getSource(const KURL& documentURL, bool& errorOccurred) con st; 75 ScriptSourceCode getSource(const KURL& documentURL, bool& errorOccurred) con st;
76 76
77 void setStreamer(PassRefPtrWillBeRawPtr<ScriptStreamer>); 77 void setStreamer(RawPtr<ScriptStreamer>);
78 void streamingFinished(); 78 void streamingFinished();
79 79
80 bool isReady() const; 80 bool isReady() const;
81 81
82 void dispose(); 82 void dispose();
83 83
84 private: 84 private:
85 PendingScript(Element*, ScriptResource*); 85 PendingScript(Element*, ScriptResource*);
86 86
87 bool m_watchingForLoad; 87 bool m_watchingForLoad;
88 RefPtrWillBeMember<Element> m_element; 88 Member<Element> m_element;
89 TextPosition m_startingPosition; // Only used for inline script tags. 89 TextPosition m_startingPosition; // Only used for inline script tags.
90 bool m_integrityFailure; 90 bool m_integrityFailure;
91 91
92 RefPtrWillBeMember<ScriptStreamer> m_streamer; 92 Member<ScriptStreamer> m_streamer;
93 ScriptResourceClient* m_client; 93 ScriptResourceClient* m_client;
94 }; 94 };
95 95
96 } // namespace blink 96 } // namespace blink
97 97
98 #endif // PendingScript_h 98 #endif // PendingScript_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698