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

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

Issue 196793021: Ignore MediaController in the video fullscreen button logic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 9 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 559
560 bool MediaController::hasAudio() const 560 bool MediaController::hasAudio() const
561 { 561 {
562 for (size_t index = 0; index < m_mediaElements.size(); ++index) { 562 for (size_t index = 0; index < m_mediaElements.size(); ++index) {
563 if (m_mediaElements[index]->hasAudio()) 563 if (m_mediaElements[index]->hasAudio())
564 return true; 564 return true;
565 } 565 }
566 return false; 566 return false;
567 } 567 }
568 568
569 bool MediaController::hasVideo() const
570 {
571 for (size_t index = 0; index < m_mediaElements.size(); ++index) {
572 if (m_mediaElements[index]->hasVideo())
573 return true;
574 }
575 return false;
576 }
577
578 bool MediaController::hasClosedCaptions() const 569 bool MediaController::hasClosedCaptions() const
579 { 570 {
580 for (size_t index = 0; index < m_mediaElements.size(); ++index) { 571 for (size_t index = 0; index < m_mediaElements.size(); ++index) {
581 if (m_mediaElements[index]->hasClosedCaptions()) 572 if (m_mediaElements[index]->hasClosedCaptions())
582 return true; 573 return true;
583 } 574 }
584 return false; 575 return false;
585 } 576 }
586 577
587 void MediaController::setClosedCaptionsVisible(bool visible) 578 void MediaController::setClosedCaptionsVisible(bool visible)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 { 636 {
646 double now = WTF::currentTime(); 637 double now = WTF::currentTime();
647 double timedelta = now - m_previousTimeupdateTime; 638 double timedelta = now - m_previousTimeupdateTime;
648 639
649 if (timedelta < maxTimeupdateEventFrequency) 640 if (timedelta < maxTimeupdateEventFrequency)
650 return; 641 return;
651 642
652 scheduleEvent(EventTypeNames::timeupdate); 643 scheduleEvent(EventTypeNames::timeupdate);
653 m_previousTimeupdateTime = now; 644 m_previousTimeupdateTime = now;
654 } 645 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698