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

Side by Side Diff: Source/core/html/MediaController.cpp

Issue 22417002: Rename ASSERT_NO_EXCEPTION_STATE and IGNORE_EXCEPTION_STATE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
« no previous file with comments | « Source/core/html/InputType.cpp ('k') | Source/core/html/MediaDocument.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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 } 475 }
476 476
477 void MediaController::bringElementUpToSpeed(HTMLMediaElement* element) 477 void MediaController::bringElementUpToSpeed(HTMLMediaElement* element)
478 { 478 {
479 ASSERT(element); 479 ASSERT(element);
480 ASSERT(m_mediaElements.contains(element)); 480 ASSERT(m_mediaElements.contains(element));
481 481
482 // When the user agent is to bring a media element up to speed with its new media controller, 482 // When the user agent is to bring a media element up to speed with its new media controller,
483 // it must seek that media element to the MediaController's media controller position relative 483 // it must seek that media element to the MediaController's media controller position relative
484 // to the media element's timeline. 484 // to the media element's timeline.
485 element->seek(currentTime(), IGNORE_EXCEPTION_STATE); 485 element->seek(currentTime(), IGNORE_EXCEPTION);
486 } 486 }
487 487
488 bool MediaController::isBlocked() const 488 bool MediaController::isBlocked() const
489 { 489 {
490 // A MediaController is a blocked media controller if the MediaController is a paused media 490 // A MediaController is a blocked media controller if the MediaController is a paused media
491 // controller, 491 // controller,
492 if (m_paused) 492 if (m_paused)
493 return true; 493 return true;
494 494
495 if (m_mediaElements.isEmpty()) 495 if (m_mediaElements.isEmpty())
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 m_asyncEventTimer.startOneShot(0); 541 m_asyncEventTimer.startOneShot(0);
542 } 542 }
543 543
544 void MediaController::asyncEventTimerFired(Timer<MediaController>*) 544 void MediaController::asyncEventTimerFired(Timer<MediaController>*)
545 { 545 {
546 Vector<RefPtr<Event> > pendingEvents; 546 Vector<RefPtr<Event> > pendingEvents;
547 547
548 m_pendingEvents.swap(pendingEvents); 548 m_pendingEvents.swap(pendingEvents);
549 size_t count = pendingEvents.size(); 549 size_t count = pendingEvents.size();
550 for (size_t index = 0; index < count; ++index) 550 for (size_t index = 0; index < count; ++index)
551 dispatchEvent(pendingEvents[index].release(), IGNORE_EXCEPTION_STATE); 551 dispatchEvent(pendingEvents[index].release(), IGNORE_EXCEPTION);
552 } 552 }
553 553
554 void MediaController::clearPositionTimerFired(Timer<MediaController>*) 554 void MediaController::clearPositionTimerFired(Timer<MediaController>*)
555 { 555 {
556 m_position = MediaPlayer::invalidTime(); 556 m_position = MediaPlayer::invalidTime();
557 } 557 }
558 558
559 bool MediaController::hasAudio() const 559 bool MediaController::hasAudio() const
560 { 560 {
561 for (size_t index = 0; index < m_mediaElements.size(); ++index) { 561 for (size_t index = 0; index < m_mediaElements.size(); ++index) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 { 653 {
654 double now = WTF::currentTime(); 654 double now = WTF::currentTime();
655 double timedelta = now - m_previousTimeupdateTime; 655 double timedelta = now - m_previousTimeupdateTime;
656 656
657 if (timedelta < maxTimeupdateEventFrequency) 657 if (timedelta < maxTimeupdateEventFrequency)
658 return; 658 return;
659 659
660 scheduleEvent(eventNames().timeupdateEvent); 660 scheduleEvent(eventNames().timeupdateEvent);
661 m_previousTimeupdateTime = now; 661 m_previousTimeupdateTime = now;
662 } 662 }
OLDNEW
« no previous file with comments | « Source/core/html/InputType.cpp ('k') | Source/core/html/MediaDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698