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

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

Issue 216523002: Oilpan: Replace most of RefPtrs for Event objects with oilpan's transition types (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 592
593 void MediaController::scheduleEvent(const AtomicString& eventName) 593 void MediaController::scheduleEvent(const AtomicString& eventName)
594 { 594 {
595 m_pendingEvents.append(Event::createCancelable(eventName)); 595 m_pendingEvents.append(Event::createCancelable(eventName));
596 if (!m_asyncEventTimer.isActive()) 596 if (!m_asyncEventTimer.isActive())
597 m_asyncEventTimer.startOneShot(0, FROM_HERE); 597 m_asyncEventTimer.startOneShot(0, FROM_HERE);
598 } 598 }
599 599
600 void MediaController::asyncEventTimerFired(Timer<MediaController>*) 600 void MediaController::asyncEventTimerFired(Timer<MediaController>*)
601 { 601 {
602 Vector<RefPtr<Event> > pendingEvents; 602 WillBeHeapVector<RefPtrWillBeMember<Event> > pendingEvents;
603 603
604 m_pendingEvents.swap(pendingEvents); 604 m_pendingEvents.swap(pendingEvents);
605 size_t count = pendingEvents.size(); 605 size_t count = pendingEvents.size();
606 for (size_t index = 0; index < count; ++index) 606 for (size_t index = 0; index < count; ++index)
607 dispatchEvent(pendingEvents[index].release(), IGNORE_EXCEPTION); 607 dispatchEvent(pendingEvents[index].release(), IGNORE_EXCEPTION);
608 } 608 }
609 609
610 void MediaController::clearPositionTimerFired(Timer<MediaController>*) 610 void MediaController::clearPositionTimerFired(Timer<MediaController>*)
611 { 611 {
612 m_position = MediaPlayer::invalidTime(); 612 m_position = MediaPlayer::invalidTime();
(...skipping 25 matching lines...) Expand all
638 { 638 {
639 double now = WTF::currentTime(); 639 double now = WTF::currentTime();
640 double timedelta = now - m_previousTimeupdateTime; 640 double timedelta = now - m_previousTimeupdateTime;
641 641
642 if (timedelta < maxTimeupdateEventFrequency) 642 if (timedelta < maxTimeupdateEventFrequency)
643 return; 643 return;
644 644
645 scheduleEvent(EventTypeNames::timeupdate); 645 scheduleEvent(EventTypeNames::timeupdate);
646 m_previousTimeupdateTime = now; 646 m_previousTimeupdateTime = now;
647 } 647 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698