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

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

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 | « Source/core/workers/WorkerScriptLoader.h ('k') | Source/platform/network/ResourceRequest.h » ('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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 { 164 {
165 notifyError(); 165 notifyError();
166 } 166 }
167 167
168 void WorkerScriptLoader::notifyError() 168 void WorkerScriptLoader::notifyError()
169 { 169 {
170 m_failed = true; 170 m_failed = true;
171 notifyFinished(); 171 notifyFinished();
172 } 172 }
173 173
174 void WorkerScriptLoader::cancel()
175 {
176 if (m_threadableLoader)
177 m_threadableLoader->cancel();
178 }
179
174 String WorkerScriptLoader::script() 180 String WorkerScriptLoader::script()
175 { 181 {
176 return m_script.toString(); 182 return m_script.toString();
177 } 183 }
178 184
179 void WorkerScriptLoader::notifyFinished() 185 void WorkerScriptLoader::notifyFinished()
180 { 186 {
181 if (!m_client || m_finishing) 187 if (!m_client || m_finishing)
182 return; 188 return;
183 189
184 m_finishing = true; 190 m_finishing = true;
185 m_client->notifyFinished(); 191 m_client->notifyFinished();
186 } 192 }
187 193
188 } // namespace WebCore 194 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerScriptLoader.h ('k') | Source/platform/network/ResourceRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698