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

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

Issue 1659793004: Fixed handling of Dart MIME type (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Updated comment 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/dom/ScriptLoader.cpp » ('j') | 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 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 String scriptCharset() const { return m_characterEncoding; } 55 String scriptCharset() const { return m_characterEncoding; }
56 String scriptContent() const; 56 String scriptContent() const;
57 // Returns false if and only if execution was blocked. 57 // Returns false if and only if execution was blocked.
58 bool executeScript(const ScriptSourceCode&, double* compilationFinishTime = 0); 58 bool executeScript(const ScriptSourceCode&, double* compilationFinishTime = 0);
59 virtual void execute(); 59 virtual void execute();
60 60
61 // XML parser calls these 61 // XML parser calls these
62 void dispatchLoadEvent(); 62 void dispatchLoadEvent();
63 void dispatchErrorEvent(); 63 void dispatchErrorEvent();
64 enum ScriptType { ScriptNone = 0, ScriptJavaScript, ScriptDart }; 64
65 ScriptType isScriptTypeSupported(LegacyTypeSupport) const; 65 bool isScriptTypeSupported(LegacyTypeSupport) const;
66 66
67 bool haveFiredLoadEvent() const { return m_haveFiredLoad; } 67 bool haveFiredLoadEvent() const { return m_haveFiredLoad; }
68 bool willBeParserExecuted() const { return m_willBeParserExecuted; } 68 bool willBeParserExecuted() const { return m_willBeParserExecuted; }
69 bool readyToBeParserExecuted() const { return m_readyToBeParserExecuted; } 69 bool readyToBeParserExecuted() const { return m_readyToBeParserExecuted; }
70 bool willExecuteWhenDocumentFinishedParsing() const { return m_willExecuteWh enDocumentFinishedParsing; } 70 bool willExecuteWhenDocumentFinishedParsing() const { return m_willExecuteWh enDocumentFinishedParsing; }
71 ResourcePtr<ScriptResource> resource() { return m_resource; } 71 ResourcePtr<ScriptResource> resource() { return m_resource; }
72 72
73 void setHaveFiredLoadEvent(bool haveFiredLoad) { m_haveFiredLoad = haveFired Load; } 73 void setHaveFiredLoadEvent(bool haveFiredLoad) { m_haveFiredLoad = haveFired Load; }
74 bool isParserInserted() const { return m_parserInserted; } 74 bool isParserInserted() const { return m_parserInserted; }
75 bool alreadyStarted() const { return m_alreadyStarted; } 75 bool alreadyStarted() const { return m_alreadyStarted; }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 bool m_parserInserted : 1; 112 bool m_parserInserted : 1;
113 bool m_isExternalScript : 1; 113 bool m_isExternalScript : 1;
114 bool m_alreadyStarted : 1; 114 bool m_alreadyStarted : 1;
115 bool m_haveFiredLoad : 1; 115 bool m_haveFiredLoad : 1;
116 bool m_willBeParserExecuted : 1; // Same as "The parser will handle executin g the script." 116 bool m_willBeParserExecuted : 1; // Same as "The parser will handle executin g the script."
117 bool m_readyToBeParserExecuted : 1; 117 bool m_readyToBeParserExecuted : 1;
118 bool m_willExecuteWhenDocumentFinishedParsing : 1; 118 bool m_willExecuteWhenDocumentFinishedParsing : 1;
119 bool m_forceAsync : 1; 119 bool m_forceAsync : 1;
120 bool m_willExecuteInOrder : 1; 120 bool m_willExecuteInOrder : 1;
121
122 // FIXMEDART: Type of script (JS, Dart, None).
123 enum ScriptType { ScriptNone = 0, ScriptJavaScript, ScriptDart };
124 ScriptType getScriptTypeSupported(LegacyTypeSupport) const;
121 ScriptType m_scriptType; 125 ScriptType m_scriptType;
122 }; 126 };
123 127
124 ScriptLoader* toScriptLoaderIfPossible(Element*); 128 ScriptLoader* toScriptLoaderIfPossible(Element*);
125 129
126 } // namespace blink 130 } // namespace blink
127 131
128 #endif // ScriptLoader_h 132 #endif // ScriptLoader_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698