| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
| 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 | 6 |
| 7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
| 8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
| 9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
| 10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 virtual ~ScriptResourceClient() { } | 38 virtual ~ScriptResourceClient() { } |
| 39 static ResourceClientType expectedType() { return ScriptType; } | 39 static ResourceClientType expectedType() { return ScriptType; } |
| 40 virtual ResourceClientType resourceClientType() const override final { retur
n expectedType(); } | 40 virtual ResourceClientType resourceClientType() const override final { retur
n expectedType(); } |
| 41 | 41 |
| 42 virtual void notifyAppendData(ScriptResource* resource) { } | 42 virtual void notifyAppendData(ScriptResource* resource) { } |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 class ScriptResource final : public TextResource { | 45 class ScriptResource final : public TextResource { |
| 46 public: | 46 public: |
| 47 typedef ScriptResourceClient ClientType; | 47 typedef ScriptResourceClient ClientType; |
| 48 static PassOwnPtrWillBeRawPtr<ScriptResource> create(const ResourceRequest&
request, const String& charset) |
| 49 { |
| 50 return adoptPtrWillBeNoop(new ScriptResource(request, charset)); |
| 51 } |
| 48 | 52 |
| 49 ScriptResource(const ResourceRequest&, const String& charset); | |
| 50 virtual ~ScriptResource(); | 53 virtual ~ScriptResource(); |
| 51 | 54 |
| 52 virtual void didAddClient(ResourceClient*) override; | 55 virtual void didAddClient(ResourceClient*) override; |
| 53 virtual void appendData(const char*, unsigned) override; | 56 virtual void appendData(const char*, unsigned) override; |
| 54 | 57 |
| 55 const String& script(); | 58 const String& script(); |
| 56 | 59 |
| 57 AtomicString mimeType() const; | 60 AtomicString mimeType() const; |
| 58 | 61 |
| 59 bool mimeTypeAllowedByNosniff() const; | 62 bool mimeTypeAllowedByNosniff() const; |
| 60 | 63 |
| 61 private: | 64 private: |
| 65 ScriptResource(const ResourceRequest&, const String& charset); |
| 66 |
| 62 AtomicString m_script; | 67 AtomicString m_script; |
| 63 }; | 68 }; |
| 64 | 69 |
| 65 DEFINE_RESOURCE_TYPE_CASTS(Script); | 70 DEFINE_RESOURCE_TYPE_CASTS(Script); |
| 66 | 71 |
| 67 } | 72 } |
| 68 | 73 |
| 69 #endif | 74 #endif |
| OLD | NEW |