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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2563853003: [MediaControls] Listen to durationchange instead of letting HTML call methods of MediaControls (Closed)
Patch Set: addressed nits from mlamouri@ Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControls.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) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 3043 matching lines...) Expand 10 before | Expand all | Expand 10 after
3054 3054
3055 // Abort if duration unchanged. 3055 // Abort if duration unchanged.
3056 if (m_duration == duration) 3056 if (m_duration == duration)
3057 return; 3057 return;
3058 3058
3059 BLINK_MEDIA_LOG << "durationChanged(" << (void*)this << ") : " << m_duration 3059 BLINK_MEDIA_LOG << "durationChanged(" << (void*)this << ") : " << m_duration
3060 << " -> " << duration; 3060 << " -> " << duration;
3061 m_duration = duration; 3061 m_duration = duration;
3062 scheduleEvent(EventTypeNames::durationchange); 3062 scheduleEvent(EventTypeNames::durationchange);
3063 3063
3064 if (mediaControls())
3065 mediaControls()->reset();
3066 if (layoutObject()) 3064 if (layoutObject())
3067 layoutObject()->updateFromElement(); 3065 layoutObject()->updateFromElement();
3068 3066
3069 if (requestSeek) 3067 if (requestSeek)
3070 seek(duration); 3068 seek(duration);
3071 } 3069 }
3072 3070
3073 void HTMLMediaElement::playbackStateChanged() { 3071 void HTMLMediaElement::playbackStateChanged() {
3074 BLINK_MEDIA_LOG << "playbackStateChanged(" << (void*)this << ")"; 3072 BLINK_MEDIA_LOG << "playbackStateChanged(" << (void*)this << ")";
3075 3073
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
4096 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4094 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4097 } 4095 }
4098 4096
4099 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4097 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4100 m_mostlyFillingViewport = true; 4098 m_mostlyFillingViewport = true;
4101 if (m_webMediaPlayer) 4099 if (m_webMediaPlayer)
4102 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4100 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4103 } 4101 }
4104 4102
4105 } // namespace blink 4103 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/shadow/MediaControls.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698