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

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

Issue 26890003: Remove ThreadLocalEventNames (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix build Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/html/MediaKeyEvent.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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 { 622 {
623 for (size_t index = 0; index < m_mediaElements.size(); ++index) { 623 for (size_t index = 0; index < m_mediaElements.size(); ++index) {
624 if (!m_mediaElements[index]->hasCurrentSrc()) 624 if (!m_mediaElements[index]->hasCurrentSrc())
625 return false; 625 return false;
626 } 626 }
627 return true; 627 return true;
628 } 628 }
629 629
630 const AtomicString& MediaController::interfaceName() const 630 const AtomicString& MediaController::interfaceName() const
631 { 631 {
632 return eventNames().interfaceForMediaController; 632 return EventTargetNames::MediaController;
633 } 633 }
634 634
635 // The spec says to fire periodic timeupdate events (those sent while playing) e very 635 // The spec says to fire periodic timeupdate events (those sent while playing) e very
636 // "15 to 250ms", we choose the slowest frequency 636 // "15 to 250ms", we choose the slowest frequency
637 static const double maxTimeupdateEventFrequency = 0.25; 637 static const double maxTimeupdateEventFrequency = 0.25;
638 638
639 void MediaController::startTimeupdateTimer() 639 void MediaController::startTimeupdateTimer()
640 { 640 {
641 if (m_timeupdateTimer.isActive()) 641 if (m_timeupdateTimer.isActive())
642 return; 642 return;
(...skipping 10 matching lines...) Expand all
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(EventTypeNames::timeupdate); 660 scheduleEvent(EventTypeNames::timeupdate);
661 m_previousTimeupdateTime = now; 661 m_previousTimeupdateTime = now;
662 } 662 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/html/MediaKeyEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698