OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 bool isEmpty() const { return m_code.length() == 0; } | 58 bool isEmpty() const { return m_code.length() == 0; } |
59 | 59 |
60 const JSC::SourceCode& jsSourceCode() const { return m_code; } | 60 const JSC::SourceCode& jsSourceCode() const { return m_code; } |
61 | 61 |
62 const String& source() const { return m_provider->source(); } | 62 const String& source() const { return m_provider->source(); } |
63 | 63 |
64 int startLine() const { return m_code.firstLine(); } | 64 int startLine() const { return m_code.firstLine(); } |
65 | 65 |
66 const KURL& url() const { return m_url; } | 66 const KURL& url() const { return m_url; } |
67 | 67 |
| 68 void setMimeType(const String& mimeType) { m_mimeType = mimeType; } |
| 69 const String& mimeType() const { return m_mimeType; } |
| 70 |
68 private: | 71 private: |
69 RefPtr<ScriptSourceProvider> m_provider; | 72 RefPtr<ScriptSourceProvider> m_provider; |
70 | 73 |
71 JSC::SourceCode m_code; | 74 JSC::SourceCode m_code; |
72 | 75 |
73 KURL m_url; | 76 KURL m_url; |
74 | 77 String m_mimeType; |
75 }; | 78 }; |
76 | 79 |
77 } // namespace WebCore | 80 } // namespace WebCore |
78 | 81 |
79 #endif // ScriptSourceCode_h | 82 #endif // ScriptSourceCode_h |
OLD | NEW |