OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 CachedScript* cachedScript() const { return m_cachedScript.get(); } | 65 CachedScript* cachedScript() const { return m_cachedScript.get(); } |
66 const KURL& url() const | 66 const KURL& url() const |
67 { | 67 { |
68 if (m_cachedScript) | 68 if (m_cachedScript) |
69 return m_cachedScript->response().url(); | 69 return m_cachedScript->response().url(); |
70 return m_url; | 70 return m_url; |
71 } | 71 } |
72 int startLine() const { return m_startPosition.m_line.oneBasedInt(); } | 72 int startLine() const { return m_startPosition.m_line.oneBasedInt(); } |
73 const TextPosition& startPosition() const { return m_startPosition; } | 73 const TextPosition& startPosition() const { return m_startPosition; } |
74 | 74 |
| 75 void setMimeType(const String& mimeType) { m_mimeType = mimeType; } |
| 76 const String& mimeType() const { return m_mimeType; } |
| 77 |
75 private: | 78 private: |
76 String m_source; | 79 String m_source; |
77 CachedResourceHandle<CachedScript> m_cachedScript; | 80 CachedResourceHandle<CachedScript> m_cachedScript; |
78 KURL m_url; | 81 KURL m_url; |
79 TextPosition m_startPosition; | 82 TextPosition m_startPosition; |
| 83 String m_mimeType; |
80 }; | 84 }; |
81 | 85 |
82 } // namespace WebCore | 86 } // namespace WebCore |
83 | 87 |
84 #endif // ScriptSourceCode_h | 88 #endif // ScriptSourceCode_h |
OLD | NEW |