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

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
« no previous file with comments | « Source/core/html/MediaController.h ('k') | Source/core/html/MediaControllerInterface.h » ('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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) {
562 if (m_mediaElements[index]->hasAudio()) 562 if (m_mediaElements[index]->hasAudio())
563 return true; 563 return true;
564 } 564 }
565 return false; 565 return false;
566 } 566 }
567 567
568 bool MediaController::hasVideo() const
569 {
570 for (size_t index = 0; index < m_mediaElements.size(); ++index) {
571 if (m_mediaElements[index]->hasVideo())
572 return true;
573 }
574 return false;
575 }
576
577 void MediaController::beginScrubbing() 568 void MediaController::beginScrubbing()
578 { 569 {
579 for (size_t index = 0; index < m_mediaElements.size(); ++index) 570 for (size_t index = 0; index < m_mediaElements.size(); ++index)
580 m_mediaElements[index]->beginScrubbing(); 571 m_mediaElements[index]->beginScrubbing();
581 if (m_playbackState == PLAYING) 572 if (m_playbackState == PLAYING)
582 m_clock->stop(); 573 m_clock->stop();
583 } 574 }
584 575
585 void MediaController::endScrubbing() 576 void MediaController::endScrubbing()
586 { 577 {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 { 619 {
629 double now = WTF::currentTime(); 620 double now = WTF::currentTime();
630 double timedelta = now - m_previousTimeupdateTime; 621 double timedelta = now - m_previousTimeupdateTime;
631 622
632 if (timedelta < maxTimeupdateEventFrequency) 623 if (timedelta < maxTimeupdateEventFrequency)
633 return; 624 return;
634 625
635 scheduleEvent(EventTypeNames::timeupdate); 626 scheduleEvent(EventTypeNames::timeupdate);
636 m_previousTimeupdateTime = now; 627 m_previousTimeupdateTime = now;
637 } 628 }
OLDNEW
« no previous file with comments | « Source/core/html/MediaController.h ('k') | Source/core/html/MediaControllerInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698