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

Side by Side Diff: Source/WebCore/platform/graphics/MediaPlayer.cpp

Issue 13454026: Update all float attributes in HTMLMediaElement and related objects to double (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed GTK change since the file is gone now. Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 virtual PlatformLayer* platformLayer() const { return 0; } 109 virtual PlatformLayer* platformLayer() const { return 0; }
110 #endif 110 #endif
111 111
112 virtual IntSize naturalSize() const { return IntSize(0, 0); } 112 virtual IntSize naturalSize() const { return IntSize(0, 0); }
113 113
114 virtual bool hasVideo() const { return false; } 114 virtual bool hasVideo() const { return false; }
115 virtual bool hasAudio() const { return false; } 115 virtual bool hasAudio() const { return false; }
116 116
117 virtual void setVisible(bool) { } 117 virtual void setVisible(bool) { }
118 118
119 virtual float duration() const { return 0; } 119 virtual double duration() const { return 0; }
120 120
121 virtual float currentTime() const { return 0; } 121 virtual double currentTime() const { return 0; }
122 virtual void seek(float) { } 122 virtual void seek(double) { }
123 virtual bool seeking() const { return false; } 123 virtual bool seeking() const { return false; }
124 124
125 virtual void setRate(float) { } 125 virtual void setRate(double) { }
126 virtual void setPreservesPitch(bool) { } 126 virtual void setPreservesPitch(bool) { }
127 virtual bool paused() const { return false; } 127 virtual bool paused() const { return false; }
128 128
129 virtual void setVolume(float) { } 129 virtual void setVolume(double) { }
130 130
131 virtual bool supportsMuting() const { return false; } 131 virtual bool supportsMuting() const { return false; }
132 virtual void setMuted(bool) { } 132 virtual void setMuted(bool) { }
133 133
134 virtual bool hasClosedCaptions() const { return false; } 134 virtual bool hasClosedCaptions() const { return false; }
135 virtual void setClosedCaptionsVisible(bool) { }; 135 virtual void setClosedCaptionsVisible(bool) { };
136 136
137 virtual MediaPlayer::NetworkState networkState() const { return MediaPlayer: :Empty; } 137 virtual MediaPlayer::NetworkState networkState() const { return MediaPlayer: :Empty; }
138 virtual MediaPlayer::ReadyState readyState() const { return MediaPlayer::Hav eNothing; } 138 virtual MediaPlayer::ReadyState readyState() const { return MediaPlayer::Hav eNothing; }
139 139
140 virtual float maxTimeSeekable() const { return 0; } 140 virtual double maxTimeSeekable() const { return 0; }
141 virtual PassRefPtr<TimeRanges> buffered() const { return TimeRanges::create( ); } 141 virtual PassRefPtr<TimeRanges> buffered() const { return TimeRanges::create( ); }
142 142
143 virtual unsigned totalBytes() const { return 0; } 143 virtual unsigned totalBytes() const { return 0; }
144 virtual bool didLoadingProgress() const { return false; } 144 virtual bool didLoadingProgress() const { return false; }
145 145
146 virtual void setSize(const IntSize&) { } 146 virtual void setSize(const IntSize&) { }
147 147
148 virtual void paint(GraphicsContext*, const IntRect&) { } 148 virtual void paint(GraphicsContext*, const IntRect&) { }
149 149
150 virtual bool canLoadPoster() const { return false; } 150 virtual bool canLoadPoster() const { return false; }
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 { 507 {
508 return m_private->addKey(keySystem.lower(), key, keyLength, initData, initDa taLength, sessionId); 508 return m_private->addKey(keySystem.lower(), key, keyLength, initData, initDa taLength, sessionId);
509 } 509 }
510 510
511 MediaPlayer::MediaKeyException MediaPlayer::cancelKeyRequest(const String& keySy stem, const String& sessionId) 511 MediaPlayer::MediaKeyException MediaPlayer::cancelKeyRequest(const String& keySy stem, const String& sessionId)
512 { 512 {
513 return m_private->cancelKeyRequest(keySystem.lower(), sessionId); 513 return m_private->cancelKeyRequest(keySystem.lower(), sessionId);
514 } 514 }
515 #endif 515 #endif
516 516
517 float MediaPlayer::duration() const 517 double MediaPlayer::duration() const
518 { 518 {
519 return m_private->duration(); 519 return m_private->duration();
520 } 520 }
521 521
522 float MediaPlayer::startTime() const 522 double MediaPlayer::startTime() const
523 { 523 {
524 return m_private->startTime(); 524 return m_private->startTime();
525 } 525 }
526 526
527 double MediaPlayer::initialTime() const 527 double MediaPlayer::initialTime() const
528 { 528 {
529 return m_private->initialTime(); 529 return m_private->initialTime();
530 } 530 }
531 531
532 float MediaPlayer::currentTime() const 532 double MediaPlayer::currentTime() const
533 { 533 {
534 return m_private->currentTime(); 534 return m_private->currentTime();
535 } 535 }
536 536
537 void MediaPlayer::seek(float time) 537 void MediaPlayer::seek(double time)
538 { 538 {
539 m_private->seek(time); 539 m_private->seek(time);
540 } 540 }
541 541
542 bool MediaPlayer::paused() const 542 bool MediaPlayer::paused() const
543 { 543 {
544 return m_private->paused(); 544 return m_private->paused();
545 } 545 }
546 546
547 bool MediaPlayer::seeking() const 547 bool MediaPlayer::seeking() const
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 MediaPlayer::NetworkState MediaPlayer::networkState() 602 MediaPlayer::NetworkState MediaPlayer::networkState()
603 { 603 {
604 return m_private->networkState(); 604 return m_private->networkState();
605 } 605 }
606 606
607 MediaPlayer::ReadyState MediaPlayer::readyState() 607 MediaPlayer::ReadyState MediaPlayer::readyState()
608 { 608 {
609 return m_private->readyState(); 609 return m_private->readyState();
610 } 610 }
611 611
612 float MediaPlayer::volume() const 612 double MediaPlayer::volume() const
613 { 613 {
614 return m_volume; 614 return m_volume;
615 } 615 }
616 616
617 void MediaPlayer::setVolume(float volume) 617 void MediaPlayer::setVolume(double volume)
618 { 618 {
619 m_volume = volume; 619 m_volume = volume;
620 620
621 if (m_private->supportsMuting() || !m_muted) 621 if (m_private->supportsMuting() || !m_muted)
622 m_private->setVolume(volume); 622 m_private->setVolume(volume);
623 } 623 }
624 624
625 bool MediaPlayer::muted() const 625 bool MediaPlayer::muted() const
626 { 626 {
627 return m_muted; 627 return m_muted;
(...skipping 12 matching lines...) Expand all
640 bool MediaPlayer::hasClosedCaptions() const 640 bool MediaPlayer::hasClosedCaptions() const
641 { 641 {
642 return m_private->hasClosedCaptions(); 642 return m_private->hasClosedCaptions();
643 } 643 }
644 644
645 void MediaPlayer::setClosedCaptionsVisible(bool closedCaptionsVisible) 645 void MediaPlayer::setClosedCaptionsVisible(bool closedCaptionsVisible)
646 { 646 {
647 m_private->setClosedCaptionsVisible(closedCaptionsVisible); 647 m_private->setClosedCaptionsVisible(closedCaptionsVisible);
648 } 648 }
649 649
650 float MediaPlayer::rate() const 650 double MediaPlayer::rate() const
651 { 651 {
652 return m_rate; 652 return m_rate;
653 } 653 }
654 654
655 void MediaPlayer::setRate(float rate) 655 void MediaPlayer::setRate(double rate)
656 { 656 {
657 m_rate = rate; 657 m_rate = rate;
658 m_private->setRate(rate); 658 m_private->setRate(rate);
659 } 659 }
660 660
661 bool MediaPlayer::preservesPitch() const 661 bool MediaPlayer::preservesPitch() const
662 { 662 {
663 return m_preservesPitch; 663 return m_preservesPitch;
664 } 664 }
665 665
666 void MediaPlayer::setPreservesPitch(bool preservesPitch) 666 void MediaPlayer::setPreservesPitch(bool preservesPitch)
667 { 667 {
668 m_preservesPitch = preservesPitch; 668 m_preservesPitch = preservesPitch;
669 m_private->setPreservesPitch(preservesPitch); 669 m_private->setPreservesPitch(preservesPitch);
670 } 670 }
671 671
672 PassRefPtr<TimeRanges> MediaPlayer::buffered() 672 PassRefPtr<TimeRanges> MediaPlayer::buffered()
673 { 673 {
674 return m_private->buffered(); 674 return m_private->buffered();
675 } 675 }
676 676
677 PassRefPtr<TimeRanges> MediaPlayer::seekable() 677 PassRefPtr<TimeRanges> MediaPlayer::seekable()
678 { 678 {
679 return m_private->seekable(); 679 return m_private->seekable();
680 } 680 }
681 681
682 float MediaPlayer::maxTimeSeekable() 682 double MediaPlayer::maxTimeSeekable()
683 { 683 {
684 return m_private->maxTimeSeekable(); 684 return m_private->maxTimeSeekable();
685 } 685 }
686 686
687 bool MediaPlayer::didLoadingProgress() 687 bool MediaPlayer::didLoadingProgress()
688 { 688 {
689 return m_private->didLoadingProgress(); 689 return m_private->didLoadingProgress();
690 } 690 }
691 691
692 void MediaPlayer::setSize(const IntSize& size) 692 void MediaPlayer::setSize(const IntSize& size)
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 bool MediaPlayer::didPassCORSAccessCheck() const 847 bool MediaPlayer::didPassCORSAccessCheck() const
848 { 848 {
849 return m_private->didPassCORSAccessCheck(); 849 return m_private->didPassCORSAccessCheck();
850 } 850 }
851 851
852 MediaPlayer::MovieLoadType MediaPlayer::movieLoadType() const 852 MediaPlayer::MovieLoadType MediaPlayer::movieLoadType() const
853 { 853 {
854 return m_private->movieLoadType(); 854 return m_private->movieLoadType();
855 } 855 }
856 856
857 float MediaPlayer::mediaTimeForTimeValue(float timeValue) const 857 double MediaPlayer::mediaTimeForTimeValue(double timeValue) const
858 { 858 {
859 return m_private->mediaTimeForTimeValue(timeValue); 859 return m_private->mediaTimeForTimeValue(timeValue);
860 } 860 }
861 861
862 double MediaPlayer::maximumDurationToCacheMediaTime() const 862 double MediaPlayer::maximumDurationToCacheMediaTime() const
863 { 863 {
864 return m_private->maximumDurationToCacheMediaTime(); 864 return m_private->maximumDurationToCacheMediaTime();
865 } 865 }
866 866
867 unsigned MediaPlayer::decodedFrameCount() const 867 unsigned MediaPlayer::decodedFrameCount() const
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 if (m_mediaPlayerClient) 945 if (m_mediaPlayerClient)
946 m_mediaPlayerClient->mediaPlayerNetworkStateChanged(this); 946 m_mediaPlayerClient->mediaPlayerNetworkStateChanged(this);
947 } 947 }
948 948
949 void MediaPlayer::readyStateChanged() 949 void MediaPlayer::readyStateChanged()
950 { 950 {
951 if (m_mediaPlayerClient) 951 if (m_mediaPlayerClient)
952 m_mediaPlayerClient->mediaPlayerReadyStateChanged(this); 952 m_mediaPlayerClient->mediaPlayerReadyStateChanged(this);
953 } 953 }
954 954
955 void MediaPlayer::volumeChanged(float newVolume) 955 void MediaPlayer::volumeChanged(double newVolume)
956 { 956 {
957 m_volume = newVolume; 957 m_volume = newVolume;
958 if (m_mediaPlayerClient) 958 if (m_mediaPlayerClient)
959 m_mediaPlayerClient->mediaPlayerVolumeChanged(this); 959 m_mediaPlayerClient->mediaPlayerVolumeChanged(this);
960 } 960 }
961 961
962 void MediaPlayer::muteChanged(bool newMuted) 962 void MediaPlayer::muteChanged(bool newMuted)
963 { 963 {
964 m_muted = newMuted; 964 m_muted = newMuted;
965 if (m_mediaPlayerClient) 965 if (m_mediaPlayerClient)
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 if (!m_private) 1150 if (!m_private)
1151 return; 1151 return;
1152 1152
1153 m_private->simulateAudioInterruption(); 1153 m_private->simulateAudioInterruption();
1154 } 1154 }
1155 #endif 1155 #endif
1156 1156
1157 } 1157 }
1158 1158
1159 #endif 1159 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698