| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. | 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const KURL& responseURL() const; | 69 const KURL& responseURL() const; |
| 70 bool failed() const { return m_failed; } | 70 bool failed() const { return m_failed; } |
| 71 unsigned long identifier() const { return m_identifier; } | 71 unsigned long identifier() const { return m_identifier; } |
| 72 | 72 |
| 73 virtual void didReceiveResponse(unsigned long /*identifier*/, const Reso
urceResponse&) OVERRIDE; | 73 virtual void didReceiveResponse(unsigned long /*identifier*/, const Reso
urceResponse&) OVERRIDE; |
| 74 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; | 74 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; |
| 75 virtual void didFinishLoading(unsigned long identifier, double) OVERRIDE
; | 75 virtual void didFinishLoading(unsigned long identifier, double) OVERRIDE
; |
| 76 virtual void didFail(const ResourceError&) OVERRIDE; | 76 virtual void didFail(const ResourceError&) OVERRIDE; |
| 77 virtual void didFailRedirectCheck() OVERRIDE; | 77 virtual void didFailRedirectCheck() OVERRIDE; |
| 78 | 78 |
| 79 void setTargetType(ResourceRequest::TargetType targetType) { m_targetTyp
e = targetType; } | 79 void setRequestContext(ResourceRequest::RequestContext requestContext) {
m_requestContext = requestContext; } |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 friend class WTF::RefCounted<WorkerScriptLoader>; | 82 friend class WTF::RefCounted<WorkerScriptLoader>; |
| 83 | 83 |
| 84 WorkerScriptLoader(); | 84 WorkerScriptLoader(); |
| 85 virtual ~WorkerScriptLoader(); | 85 virtual ~WorkerScriptLoader(); |
| 86 | 86 |
| 87 PassOwnPtr<ResourceRequest> createResourceRequest(); | 87 PassOwnPtr<ResourceRequest> createResourceRequest(); |
| 88 void notifyFinished(); | 88 void notifyFinished(); |
| 89 | 89 |
| 90 WorkerScriptLoaderClient* m_client; | 90 WorkerScriptLoaderClient* m_client; |
| 91 RefPtr<ThreadableLoader> m_threadableLoader; | 91 RefPtr<ThreadableLoader> m_threadableLoader; |
| 92 String m_responseEncoding; | 92 String m_responseEncoding; |
| 93 OwnPtr<TextResourceDecoder> m_decoder; | 93 OwnPtr<TextResourceDecoder> m_decoder; |
| 94 StringBuilder m_script; | 94 StringBuilder m_script; |
| 95 KURL m_url; | 95 KURL m_url; |
| 96 KURL m_responseURL; | 96 KURL m_responseURL; |
| 97 bool m_failed; | 97 bool m_failed; |
| 98 unsigned long m_identifier; | 98 unsigned long m_identifier; |
| 99 bool m_finishing; | 99 bool m_finishing; |
| 100 ResourceRequest::TargetType m_targetType; | 100 ResourceRequest::RequestContext m_requestContext; |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 } // namespace WebCore | 103 } // namespace WebCore |
| 104 | 104 |
| 105 #endif // WorkerScriptLoader_h | 105 #endif // WorkerScriptLoader_h |
| OLD | NEW |