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

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

Issue 2780463002: Introduce blink::Script (Closed)
Patch Set: Rebase Created 3 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) 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 21 matching lines...) Expand all
32 #include "core/loader/resource/ScriptResource.h" 32 #include "core/loader/resource/ScriptResource.h"
33 #include "platform/MemoryCoordinator.h" 33 #include "platform/MemoryCoordinator.h"
34 #include "platform/heap/Handle.h" 34 #include "platform/heap/Handle.h"
35 #include "platform/loader/fetch/ResourceOwner.h" 35 #include "platform/loader/fetch/ResourceOwner.h"
36 #include "platform/wtf/Noncopyable.h" 36 #include "platform/wtf/Noncopyable.h"
37 #include "platform/wtf/text/TextPosition.h" 37 #include "platform/wtf/text/TextPosition.h"
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class PendingScript; 41 class PendingScript;
42 class ScriptSourceCode; 42 class ClassicScript;
43 43
44 class CORE_EXPORT PendingScriptClient : public GarbageCollectedMixin { 44 class CORE_EXPORT PendingScriptClient : public GarbageCollectedMixin {
45 public: 45 public:
46 virtual ~PendingScriptClient() {} 46 virtual ~PendingScriptClient() {}
47 47
48 // Invoked when the pending script has finished loading. This could be during 48 // Invoked when the pending script has finished loading. This could be during
49 // |watchForLoad| (if the pending script was already ready), or when the 49 // |watchForLoad| (if the pending script was already ready), or when the
50 // resource loads (if script streaming is not occurring), or when script 50 // resource loads (if script streaming is not occurring), or when script
51 // streaming finishes. 51 // streaming finishes.
52 virtual void PendingScriptFinished(PendingScript*) = 0; 52 virtual void PendingScriptFinished(PendingScript*) = 0;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 return parser_blocking_load_start_time_; 88 return parser_blocking_load_start_time_;
89 } 89 }
90 90
91 void WatchForLoad(PendingScriptClient*); 91 void WatchForLoad(PendingScriptClient*);
92 void StopWatchingForLoad(); 92 void StopWatchingForLoad();
93 93
94 ScriptElementBase* GetElement() const; 94 ScriptElementBase* GetElement() const;
95 95
96 DECLARE_TRACE(); 96 DECLARE_TRACE();
97 97
98 ScriptSourceCode GetSource(const KURL& document_url, 98 ClassicScript* GetSource(const KURL& document_url,
99 bool& error_occurred) const; 99 bool& error_occurred) const;
100 100
101 void SetStreamer(ScriptStreamer*); 101 void SetStreamer(ScriptStreamer*);
102 void StreamingFinished(); 102 void StreamingFinished();
103 103
104 bool IsReady() const; 104 bool IsReady() const;
105 bool ErrorOccurred() const; 105 bool ErrorOccurred() const;
106 106
107 void StartStreamingIfPossible(Document*, ScriptStreamer::Type); 107 void StartStreamingIfPossible(Document*, ScriptStreamer::Type);
108 void Dispose(); 108 void Dispose();
109 109
(...skipping 29 matching lines...) Expand all
139 Member<PendingScriptClient> client_; 139 Member<PendingScriptClient> client_;
140 140
141 // This flag is used to skip non-null checks of |m_element| in unit 141 // This flag is used to skip non-null checks of |m_element| in unit
142 // tests, because |m_element| can be null in unit tests. 142 // tests, because |m_element| can be null in unit tests.
143 const bool is_for_testing_; 143 const bool is_for_testing_;
144 }; 144 };
145 145
146 } // namespace blink 146 } // namespace blink
147 147
148 #endif // PendingScript_h 148 #endif // PendingScript_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ModuleScript.cpp ('k') | third_party/WebKit/Source/core/dom/PendingScript.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698