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

Side by Side Diff: Source/modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp

Issue 17648006: Rename WorkerContext to WorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 211 }
212 212
213 void ThreadableWebSocketChannelClientWrapper::resume() 213 void ThreadableWebSocketChannelClientWrapper::resume()
214 { 214 {
215 m_suspended = false; 215 m_suspended = false;
216 processPendingTasks(); 216 processPendingTasks();
217 } 217 }
218 218
219 void ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback(Script ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> w rapper) 219 void ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback(Script ExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper> w rapper)
220 { 220 {
221 ASSERT_UNUSED(context, context->isWorkerContext()); 221 ASSERT_UNUSED(context, context->isWorkerGlobalScope());
222 wrapper->processPendingTasks(); 222 wrapper->processPendingTasks();
223 } 223 }
224 224
225 void ThreadableWebSocketChannelClientWrapper::processPendingTasks() 225 void ThreadableWebSocketChannelClientWrapper::processPendingTasks()
226 { 226 {
227 if (m_suspended) 227 if (m_suspended)
228 return; 228 return;
229 if (!m_syncMethodDone) { 229 if (!m_syncMethodDone) {
230 // When a synchronous operation is in progress (i.e. the execution stack contains 230 // When a synchronous operation is in progress (i.e. the execution stack contains
231 // WorkerThreadableWebSocketChannel::waitForMethodCompletion()), we cann ot invoke callbacks in this run loop. 231 // WorkerThreadableWebSocketChannel::waitForMethodCompletion()), we cann ot invoke callbacks in this run loop.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 282
283 void ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback(Scr iptExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper > wrapper) 283 void ThreadableWebSocketChannelClientWrapper::didReceiveMessageErrorCallback(Scr iptExecutionContext* context, PassRefPtr<ThreadableWebSocketChannelClientWrapper > wrapper)
284 { 284 {
285 ASSERT_UNUSED(context, !context); 285 ASSERT_UNUSED(context, !context);
286 if (wrapper->m_client) 286 if (wrapper->m_client)
287 wrapper->m_client->didReceiveMessageError(); 287 wrapper->m_client->didReceiveMessageError();
288 } 288 }
289 289
290 } // namespace WebCore 290 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/webdatabase/WorkerGlobalScopeWebDatabase.idl ('k') | Source/modules/websockets/WebSocket.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698