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

Side by Side Diff: Source/core/html/HTMLMediaElement.h

Issue 1297983002: Update poster code as per https://html.spec.whatwg.org/#show-poster-flag (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.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) 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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 274
275 void parseAttribute(const QualifiedName&, const AtomicString&) override; 275 void parseAttribute(const QualifiedName&, const AtomicString&) override;
276 void finishParsingChildren() final; 276 void finishParsingChildren() final;
277 bool isURLAttribute(const Attribute&) const override; 277 bool isURLAttribute(const Attribute&) const override;
278 void attach(const AttachContext& = AttachContext()) override; 278 void attach(const AttachContext& = AttachContext()) override;
279 279
280 void didMoveToNewDocument(Document& oldDocument) override; 280 void didMoveToNewDocument(Document& oldDocument) override;
281 virtual KURL posterImageURL() const { return KURL(); } 281 virtual KURL posterImageURL() const { return KURL(); }
282 282
283 enum DisplayMode { Unknown, Poster, Video }; 283 enum DisplayMode { Unknown, Poster, Video };
284 DisplayMode displayMode() const { return m_displayMode; } 284 virtual DisplayMode displayMode() const { return Unknown; }
philipj_slow 2015/08/18 08:24:48 Do these need to be virtual and on HTMLMediaElemen
Srirama 2015/08/18 08:58:26 But our intention is to make sure these functions
philipj_slow 2015/08/18 09:10:28 It looks like the displayMode() getter is only use
285 virtual void setDisplayMode(DisplayMode mode) { m_displayMode = mode; } 285 virtual void setDisplayMode(DisplayMode mode) { }
286 286
287 void setControllerInternal(MediaController*); 287 void setControllerInternal(MediaController*);
288 288
289 private: 289 private:
290 void resetMediaPlayerAndMediaSource(); 290 void resetMediaPlayerAndMediaSource();
291 291
292 bool alwaysCreateUserAgentShadowRoot() const final { return true; } 292 bool alwaysCreateUserAgentShadowRoot() const final { return true; }
293 bool areAuthorShadowsAllowed() const final { return false; } 293 bool areAuthorShadowsAllowed() const final { return false; }
294 294
295 bool supportsFocus() const final; 295 bool supportsFocus() const final;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 // The load is deferred, and waiting for the task to set the 501 // The load is deferred, and waiting for the task to set the
502 // delaying-the-load-event flag, after which the load will be executed. 502 // delaying-the-load-event flag, after which the load will be executed.
503 ExecuteOnStopDelayingLoadEventTask 503 ExecuteOnStopDelayingLoadEventTask
504 }; 504 };
505 DeferredLoadState m_deferredLoadState; 505 DeferredLoadState m_deferredLoadState;
506 Timer<HTMLMediaElement> m_deferredLoadTimer; 506 Timer<HTMLMediaElement> m_deferredLoadTimer;
507 507
508 OwnPtr<WebMediaPlayer> m_webMediaPlayer; 508 OwnPtr<WebMediaPlayer> m_webMediaPlayer;
509 WebLayer* m_webLayer; 509 WebLayer* m_webLayer;
510 510
511 DisplayMode m_displayMode;
512
513 RefPtrWillBeMember<HTMLMediaSource> m_mediaSource; 511 RefPtrWillBeMember<HTMLMediaSource> m_mediaSource;
514 512
515 // Cached time value. Only valid when ready state is HAVE_METADATA or 513 // Cached time value. Only valid when ready state is HAVE_METADATA or
516 // higher, otherwise the current time is assumed to be zero. 514 // higher, otherwise the current time is assumed to be zero.
517 mutable double m_cachedTime; 515 mutable double m_cachedTime;
518 516
519 double m_fragmentEndTime; 517 double m_fragmentEndTime;
520 518
521 typedef unsigned PendingActionFlags; 519 typedef unsigned PendingActionFlags;
522 PendingActionFlags m_pendingActionFlags; 520 PendingActionFlags m_pendingActionFlags;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 inline bool isHTMLMediaElement(const HTMLElement& element) 627 inline bool isHTMLMediaElement(const HTMLElement& element)
630 { 628 {
631 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 629 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
632 } 630 }
633 631
634 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 632 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
635 633
636 } // namespace blink 634 } // namespace blink
637 635
638 #endif // HTMLMediaElement_h 636 #endif // HTMLMediaElement_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698