Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 66 | 66 |
| 67 typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; | 67 typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; |
| 68 typedef CueIntervalTree::IntervalType CueInterval; | 68 typedef CueIntervalTree::IntervalType CueInterval; |
| 69 typedef Vector<CueInterval> CueList; | 69 typedef Vector<CueInterval> CueList; |
| 70 | 70 |
| 71 // FIXME: The inheritance from MediaPlayerClient here should be private inherita nce. | 71 // FIXME: The inheritance from MediaPlayerClient here should be private inherita nce. |
| 72 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it | 72 // But it can't be until the Chromium WebMediaPlayerClientImpl class is fixed so it |
| 73 // no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement. | 73 // no longer depends on typecasting a MediaPlayerClient to an HTMLMediaElement. |
| 74 | 74 |
| 75 class HTMLMediaElement : public HTMLElement, public MediaPlayerClient, public Ac tiveDOMObject, public MediaControllerInterface | 75 class HTMLMediaElement : public HTMLElement, public MediaPlayerClient, public Ac tiveDOMObject, public MediaControllerInterface |
| 76 , private TextTrackClient | |
| 77 { | 76 { |
| 78 public: | 77 public: |
| 79 static blink::WebMimeRegistry::SupportsType supportsType(const ContentType&, const String& keySystem = String()); | 78 static blink::WebMimeRegistry::SupportsType supportsType(const ContentType&, const String& keySystem = String()); |
| 80 | 79 |
| 81 static void setMediaStreamRegistry(URLRegistry*); | 80 static void setMediaStreamRegistry(URLRegistry*); |
| 82 static bool isMediaStreamURL(const String& url); | 81 static bool isMediaStreamURL(const String& url); |
| 83 | 82 |
| 84 MediaPlayer* player() const { return m_player.get(); } | 83 MediaPlayer* player() const { return m_player.get(); } |
| 85 | 84 |
| 86 virtual bool isVideo() const = 0; | 85 virtual bool isVideo() const = 0; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 | 225 |
| 227 bool textTracksAreReady() const; | 226 bool textTracksAreReady() const; |
| 228 enum VisibilityChangeAssumption { | 227 enum VisibilityChangeAssumption { |
| 229 AssumeNoVisibleChange, | 228 AssumeNoVisibleChange, |
| 230 AssumeVisibleChange | 229 AssumeVisibleChange |
| 231 }; | 230 }; |
| 232 void configureTextTrackDisplay(VisibilityChangeAssumption); | 231 void configureTextTrackDisplay(VisibilityChangeAssumption); |
| 233 void updateTextTrackDisplay(); | 232 void updateTextTrackDisplay(); |
| 234 void textTrackReadyStateChanged(TextTrack*); | 233 void textTrackReadyStateChanged(TextTrack*); |
| 235 | 234 |
| 236 // TextTrackClient | 235 virtual void textTrackKindChanged(TextTrack*); |
|
adamk
2014/02/27 01:55:09
Can these be non-virtual now?
acolwell GONE FROM CHROMIUM
2014/02/27 03:57:06
Yes. Done.
| |
| 237 virtual void textTrackKindChanged(TextTrack*) OVERRIDE FINAL; | 236 virtual void textTrackModeChanged(TextTrack*); |
| 238 virtual void textTrackModeChanged(TextTrack*) OVERRIDE FINAL; | 237 virtual void textTrackAddCues(TextTrack*, const TextTrackCueList*); |
| 239 virtual void textTrackAddCues(TextTrack*, const TextTrackCueList*) OVERRIDE FINAL; | 238 virtual void textTrackRemoveCues(TextTrack*, const TextTrackCueList*); |
| 240 virtual void textTrackRemoveCues(TextTrack*, const TextTrackCueList*) OVERRI DE FINAL; | 239 virtual void textTrackAddCue(TextTrack*, PassRefPtr<TextTrackCue>); |
| 241 virtual void textTrackAddCue(TextTrack*, PassRefPtr<TextTrackCue>) OVERRIDE FINAL; | 240 virtual void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>); |
| 242 virtual void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>) OVERRI DE FINAL; | |
| 243 | 241 |
| 244 // EventTarget function. | 242 // EventTarget function. |
| 245 // Both Node (via HTMLElement) and ActiveDOMObject define this method, which | 243 // Both Node (via HTMLElement) and ActiveDOMObject define this method, which |
| 246 // causes an ambiguity error at compile time. This class's constructor | 244 // causes an ambiguity error at compile time. This class's constructor |
| 247 // ensures that both implementations return document, so return the result | 245 // ensures that both implementations return document, so return the result |
| 248 // of one of them here. | 246 // of one of them here. |
| 249 virtual ExecutionContext* executionContext() const OVERRIDE FINAL { return H TMLElement::executionContext(); } | 247 virtual ExecutionContext* executionContext() const OVERRIDE FINAL { return H TMLElement::executionContext(); } |
| 250 | 248 |
| 251 bool hasSingleSecurityOrigin() const { return !m_player || m_player->hasSing leSecurityOrigin(); } | 249 bool hasSingleSecurityOrigin() const { return !m_player || m_player->hasSing leSecurityOrigin(); } |
| 252 | 250 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 579 inline bool isHTMLMediaElement(const Node& node) | 577 inline bool isHTMLMediaElement(const Node& node) |
| 580 { | 578 { |
| 581 return node.isElementNode() && toElement(node).isMediaElement(); | 579 return node.isElementNode() && toElement(node).isMediaElement(); |
| 582 } | 580 } |
| 583 | 581 |
| 584 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 582 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
| 585 | 583 |
| 586 } //namespace | 584 } //namespace |
| 587 | 585 |
| 588 #endif | 586 #endif |
| OLD | NEW |