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

Side by Side Diff: Source/core/workers/WorkerScriptLoader.h

Issue 78233002: Implement initial part of WebEmbeddedWorker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed comments Created 7 years 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/workers/WorkerScriptLoader.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) 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 static PassRefPtr<WorkerScriptLoader> create() 51 static PassRefPtr<WorkerScriptLoader> create()
52 { 52 {
53 return adoptRef(new WorkerScriptLoader()); 53 return adoptRef(new WorkerScriptLoader());
54 } 54 }
55 55
56 void loadSynchronously(ExecutionContext*, const KURL&, CrossOriginReques tPolicy); 56 void loadSynchronously(ExecutionContext*, const KURL&, CrossOriginReques tPolicy);
57 void loadAsynchronously(ExecutionContext*, const KURL&, CrossOriginReque stPolicy, WorkerScriptLoaderClient*); 57 void loadAsynchronously(ExecutionContext*, const KURL&, CrossOriginReque stPolicy, WorkerScriptLoaderClient*);
58 58
59 void notifyError(); 59 void notifyError();
60 60
61 // This will immediately lead to notifyFinished() if loadAsynchronously
62 // is in progress.
63 void cancel();
64
65 void setClient(WorkerScriptLoaderClient* client) { m_client = client; }
66
61 String script(); 67 String script();
62 const KURL& url() const { return m_url; } 68 const KURL& url() const { return m_url; }
63 const KURL& responseURL() const; 69 const KURL& responseURL() const;
64 bool failed() const { return m_failed; } 70 bool failed() const { return m_failed; }
65 unsigned long identifier() const { return m_identifier; } 71 unsigned long identifier() const { return m_identifier; }
66 72
67 virtual void didReceiveResponse(unsigned long /*identifier*/, const Reso urceResponse&) OVERRIDE; 73 virtual void didReceiveResponse(unsigned long /*identifier*/, const Reso urceResponse&) OVERRIDE;
68 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE; 74 virtual void didReceiveData(const char* data, int dataLength) OVERRIDE;
69 virtual void didFinishLoading(unsigned long identifier, double) OVERRIDE ; 75 virtual void didFinishLoading(unsigned long identifier, double) OVERRIDE ;
70 virtual void didFail(const ResourceError&) OVERRIDE; 76 virtual void didFail(const ResourceError&) OVERRIDE;
(...skipping 19 matching lines...) Expand all
90 KURL m_responseURL; 96 KURL m_responseURL;
91 bool m_failed; 97 bool m_failed;
92 unsigned long m_identifier; 98 unsigned long m_identifier;
93 bool m_finishing; 99 bool m_finishing;
94 ResourceRequest::TargetType m_targetType; 100 ResourceRequest::TargetType m_targetType;
95 }; 101 };
96 102
97 } // namespace WebCore 103 } // namespace WebCore
98 104
99 #endif // WorkerScriptLoader_h 105 #endif // WorkerScriptLoader_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/workers/WorkerScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698