OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 if (bridge->client()) | 300 if (bridge->client()) |
301 bridge->client()->didReceiveBinaryMessage(payload); | 301 bridge->client()->didReceiveBinaryMessage(payload); |
302 } | 302 } |
303 | 303 |
304 void Peer::didReceiveBinaryMessage(PassOwnPtr<Vector<char> > payload) | 304 void Peer::didReceiveBinaryMessage(PassOwnPtr<Vector<char> > payload) |
305 { | 305 { |
306 ASSERT(isMainThread()); | 306 ASSERT(isMainThread()); |
307 m_loaderProxy.postTaskToWorkerGlobalScope(createCrossThreadTask(&workerGloba
lScopeDidReceiveBinaryMessage, m_bridge, payload)); | 307 m_loaderProxy.postTaskToWorkerGlobalScope(createCrossThreadTask(&workerGloba
lScopeDidReceiveBinaryMessage, m_bridge, payload)); |
308 } | 308 } |
309 | 309 |
310 static void workerGlobalScopeDidConsumeBufferedAmount(ExecutionContext* context,
Bridge* bridge, unsigned long consumed) | 310 static void workerGlobalScopeDidConsumeBufferedAmount(ExecutionContext* context,
Bridge* bridge, unsigned consumed) |
311 { | 311 { |
312 ASSERT_UNUSED(context, context->isWorkerGlobalScope()); | 312 ASSERT_UNUSED(context, context->isWorkerGlobalScope()); |
313 if (bridge->client()) | 313 if (bridge->client()) |
314 bridge->client()->didConsumeBufferedAmount(consumed); | 314 bridge->client()->didConsumeBufferedAmount(consumed); |
315 } | 315 } |
316 | 316 |
317 void Peer::didConsumeBufferedAmount(unsigned long consumed) | 317 void Peer::didConsumeBufferedAmount(unsigned consumed) |
318 { | 318 { |
319 ASSERT(isMainThread()); | 319 ASSERT(isMainThread()); |
320 m_loaderProxy.postTaskToWorkerGlobalScope(createCrossThreadTask(&workerGloba
lScopeDidConsumeBufferedAmount, m_bridge, consumed)); | 320 m_loaderProxy.postTaskToWorkerGlobalScope(createCrossThreadTask(&workerGloba
lScopeDidConsumeBufferedAmount, m_bridge, consumed)); |
321 } | 321 } |
322 | 322 |
323 static void workerGlobalScopeDidStartClosingHandshake(ExecutionContext* context,
Bridge* bridge) | 323 static void workerGlobalScopeDidStartClosingHandshake(ExecutionContext* context,
Bridge* bridge) |
324 { | 324 { |
325 ASSERT_UNUSED(context, context->isWorkerGlobalScope()); | 325 ASSERT_UNUSED(context, context->isWorkerGlobalScope()); |
326 if (bridge->client()) | 326 if (bridge->client()) |
327 bridge->client()->didStartClosingHandshake(); | 327 bridge->client()->didStartClosingHandshake(); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 | 473 |
474 void Bridge::trace(Visitor* visitor) | 474 void Bridge::trace(Visitor* visitor) |
475 { | 475 { |
476 visitor->trace(m_client); | 476 visitor->trace(m_client); |
477 visitor->trace(m_workerGlobalScope); | 477 visitor->trace(m_workerGlobalScope); |
478 visitor->trace(m_syncHelper); | 478 visitor->trace(m_syncHelper); |
479 visitor->trace(m_peer); | 479 visitor->trace(m_peer); |
480 } | 480 } |
481 | 481 |
482 } // namespace blink | 482 } // namespace blink |
OLD | NEW |