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

Side by Side Diff: third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp

Issue 1362973004: Rename FROM_HERE to BLINK_FROM_HERE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // (Done in constructor.) 440 // (Done in constructor.)
441 441
442 // 8. Let promise be a new promise. 442 // 8. Let promise be a new promise.
443 NewSessionResultPromise* result = new NewSessionResultPromise(scriptState, t his); 443 NewSessionResultPromise* result = new NewSessionResultPromise(scriptState, t his);
444 ScriptPromise promise = result->promise(); 444 ScriptPromise promise = result->promise();
445 445
446 // 9. Run the following steps asynchronously (documented in 446 // 9. Run the following steps asynchronously (documented in
447 // actionTimerFired()) 447 // actionTimerFired())
448 m_pendingActions.append(PendingAction::CreatePendingGenerateRequest(result, initDataType, initDataBuffer.release())); 448 m_pendingActions.append(PendingAction::CreatePendingGenerateRequest(result, initDataType, initDataBuffer.release()));
449 ASSERT(!m_actionTimer.isActive()); 449 ASSERT(!m_actionTimer.isActive());
450 m_actionTimer.startOneShot(0, FROM_HERE); 450 m_actionTimer.startOneShot(0, BLINK_FROM_HERE);
451 451
452 // 10. Return promise. 452 // 10. Return promise.
453 return promise; 453 return promise;
454 } 454 }
455 455
456 ScriptPromise MediaKeySession::load(ScriptState* scriptState, const String& sess ionId) 456 ScriptPromise MediaKeySession::load(ScriptState* scriptState, const String& sess ionId)
457 { 457 {
458 WTF_LOG(Media, "MediaKeySession(%p)::load %s", this, sessionId.ascii().data( )); 458 WTF_LOG(Media, "MediaKeySession(%p)::load %s", this, sessionId.ascii().data( ));
459 459
460 // From https://w3c.github.io/encrypted-media/#load: 460 // From https://w3c.github.io/encrypted-media/#load:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // (Available as executionContext()->securityOrigin() anytime.) 494 // (Available as executionContext()->securityOrigin() anytime.)
495 495
496 // 7. Let promise be a new promise. 496 // 7. Let promise be a new promise.
497 LoadSessionResultPromise* result = new LoadSessionResultPromise(scriptState, this); 497 LoadSessionResultPromise* result = new LoadSessionResultPromise(scriptState, this);
498 ScriptPromise promise = result->promise(); 498 ScriptPromise promise = result->promise();
499 499
500 // 8. Run the following steps asynchronously (documented in 500 // 8. Run the following steps asynchronously (documented in
501 // actionTimerFired()) 501 // actionTimerFired())
502 m_pendingActions.append(PendingAction::CreatePendingLoadRequest(result, sess ionId)); 502 m_pendingActions.append(PendingAction::CreatePendingLoadRequest(result, sess ionId));
503 ASSERT(!m_actionTimer.isActive()); 503 ASSERT(!m_actionTimer.isActive());
504 m_actionTimer.startOneShot(0, FROM_HERE); 504 m_actionTimer.startOneShot(0, BLINK_FROM_HERE);
505 505
506 // 9. Return promise. 506 // 9. Return promise.
507 return promise; 507 return promise;
508 } 508 }
509 509
510 ScriptPromise MediaKeySession::update(ScriptState* scriptState, const DOMArrayPi ece& response) 510 ScriptPromise MediaKeySession::update(ScriptState* scriptState, const DOMArrayPi ece& response)
511 { 511 {
512 WTF_LOG(Media, "MediaKeySession(%p)::update", this); 512 WTF_LOG(Media, "MediaKeySession(%p)::update", this);
513 ASSERT(!m_isClosed); 513 ASSERT(!m_isClosed);
514 514
(...skipping 17 matching lines...) Expand all
532 RefPtr<DOMArrayBuffer> responseCopy = DOMArrayBuffer::create(response.data() , response.byteLength()); 532 RefPtr<DOMArrayBuffer> responseCopy = DOMArrayBuffer::create(response.data() , response.byteLength());
533 533
534 // 4. Let promise be a new promise. 534 // 4. Let promise be a new promise.
535 SimpleContentDecryptionModuleResultPromise* result = new SimpleContentDecryp tionModuleResultPromise(scriptState); 535 SimpleContentDecryptionModuleResultPromise* result = new SimpleContentDecryp tionModuleResultPromise(scriptState);
536 ScriptPromise promise = result->promise(); 536 ScriptPromise promise = result->promise();
537 537
538 // 5. Run the following steps asynchronously (documented in 538 // 5. Run the following steps asynchronously (documented in
539 // actionTimerFired()) 539 // actionTimerFired())
540 m_pendingActions.append(PendingAction::CreatePendingUpdate(result, responseC opy.release())); 540 m_pendingActions.append(PendingAction::CreatePendingUpdate(result, responseC opy.release()));
541 if (!m_actionTimer.isActive()) 541 if (!m_actionTimer.isActive())
542 m_actionTimer.startOneShot(0, FROM_HERE); 542 m_actionTimer.startOneShot(0, BLINK_FROM_HERE);
543 543
544 // 6. Return promise. 544 // 6. Return promise.
545 return promise; 545 return promise;
546 } 546 }
547 547
548 ScriptPromise MediaKeySession::close(ScriptState* scriptState) 548 ScriptPromise MediaKeySession::close(ScriptState* scriptState)
549 { 549 {
550 WTF_LOG(Media, "MediaKeySession(%p)::close", this); 550 WTF_LOG(Media, "MediaKeySession(%p)::close", this);
551 551
552 // From https://w3c.github.io/encrypted-media/#close: 552 // From https://w3c.github.io/encrypted-media/#close:
(...skipping 12 matching lines...) Expand all
565 return ScriptPromise::cast(scriptState, ScriptValue()); 565 return ScriptPromise::cast(scriptState, ScriptValue());
566 566
567 // 3. Let promise be a new promise. 567 // 3. Let promise be a new promise.
568 SimpleContentDecryptionModuleResultPromise* result = new SimpleContentDecryp tionModuleResultPromise(scriptState); 568 SimpleContentDecryptionModuleResultPromise* result = new SimpleContentDecryp tionModuleResultPromise(scriptState);
569 ScriptPromise promise = result->promise(); 569 ScriptPromise promise = result->promise();
570 570
571 // 4. Run the following steps asynchronously (documented in 571 // 4. Run the following steps asynchronously (documented in
572 // actionTimerFired()). 572 // actionTimerFired()).
573 m_pendingActions.append(PendingAction::CreatePendingClose(result)); 573 m_pendingActions.append(PendingAction::CreatePendingClose(result));
574 if (!m_actionTimer.isActive()) 574 if (!m_actionTimer.isActive())
575 m_actionTimer.startOneShot(0, FROM_HERE); 575 m_actionTimer.startOneShot(0, BLINK_FROM_HERE);
576 576
577 // 5. Return promise. 577 // 5. Return promise.
578 return promise; 578 return promise;
579 } 579 }
580 580
581 ScriptPromise MediaKeySession::remove(ScriptState* scriptState) 581 ScriptPromise MediaKeySession::remove(ScriptState* scriptState)
582 { 582 {
583 WTF_LOG(Media, "MediaKeySession(%p)::remove", this); 583 WTF_LOG(Media, "MediaKeySession(%p)::remove", this);
584 584
585 // From https://w3c.github.io/encrypted-media/#remove: 585 // From https://w3c.github.io/encrypted-media/#remove:
(...skipping 22 matching lines...) Expand all
608 } 608 }
609 609
610 // 4. Let promise be a new promise. 610 // 4. Let promise be a new promise.
611 SimpleContentDecryptionModuleResultPromise* result = new SimpleContentDecryp tionModuleResultPromise(scriptState); 611 SimpleContentDecryptionModuleResultPromise* result = new SimpleContentDecryp tionModuleResultPromise(scriptState);
612 ScriptPromise promise = result->promise(); 612 ScriptPromise promise = result->promise();
613 613
614 // 5. Run the following steps asynchronously (documented in 614 // 5. Run the following steps asynchronously (documented in
615 // actionTimerFired()). 615 // actionTimerFired()).
616 m_pendingActions.append(PendingAction::CreatePendingRemove(result)); 616 m_pendingActions.append(PendingAction::CreatePendingRemove(result));
617 if (!m_actionTimer.isActive()) 617 if (!m_actionTimer.isActive())
618 m_actionTimer.startOneShot(0, FROM_HERE); 618 m_actionTimer.startOneShot(0, BLINK_FROM_HERE);
619 619
620 // 6. Return promise. 620 // 6. Return promise.
621 return promise; 621 return promise;
622 } 622 }
623 623
624 void MediaKeySession::actionTimerFired(Timer<MediaKeySession>*) 624 void MediaKeySession::actionTimerFired(Timer<MediaKeySession>*)
625 { 625 {
626 ASSERT(m_pendingActions.size()); 626 ASSERT(m_pendingActions.size());
627 627
628 // Resolving promises now run synchronously and may result in additional 628 // Resolving promises now run synchronously and may result in additional
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
925 visitor->trace(m_asyncEventQueue); 925 visitor->trace(m_asyncEventQueue);
926 visitor->trace(m_pendingActions); 926 visitor->trace(m_pendingActions);
927 visitor->trace(m_mediaKeys); 927 visitor->trace(m_mediaKeys);
928 visitor->trace(m_keyStatusesMap); 928 visitor->trace(m_keyStatusesMap);
929 visitor->trace(m_closedPromise); 929 visitor->trace(m_closedPromise);
930 RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession>::trace( visitor); 930 RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession>::trace( visitor);
931 ActiveDOMObject::trace(visitor); 931 ActiveDOMObject::trace(visitor);
932 } 932 }
933 933
934 } // namespace blink 934 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698