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

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

Issue 2411553003: Notify WebMediaPlayer when its ancestor enters/exists fullscreen. (Closed)
Patch Set: Rebased. Add FullscreenObserver. Created 4 years, 2 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 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 15 matching lines...) Expand all
26 26
27 #ifndef HTMLMediaElement_h 27 #ifndef HTMLMediaElement_h
28 #define HTMLMediaElement_h 28 #define HTMLMediaElement_h
29 29
30 #include "bindings/core/v8/ActiveScriptWrappable.h" 30 #include "bindings/core/v8/ActiveScriptWrappable.h"
31 #include "bindings/core/v8/ScriptPromise.h" 31 #include "bindings/core/v8/ScriptPromise.h"
32 #include "bindings/core/v8/ScriptWrappableVisitor.h" 32 #include "bindings/core/v8/ScriptWrappableVisitor.h"
33 #include "core/CoreExport.h" 33 #include "core/CoreExport.h"
34 #include "core/dom/ActiveDOMObject.h" 34 #include "core/dom/ActiveDOMObject.h"
35 #include "core/dom/ExceptionCode.h" 35 #include "core/dom/ExceptionCode.h"
36 #include "core/dom/Fullscreen.h"
36 #include "core/events/GenericEventQueue.h" 37 #include "core/events/GenericEventQueue.h"
37 #include "core/html/AutoplayExperimentHelper.h" 38 #include "core/html/AutoplayExperimentHelper.h"
38 #include "core/html/HTMLElement.h" 39 #include "core/html/HTMLElement.h"
39 #include "core/html/track/TextTrack.h" 40 #include "core/html/track/TextTrack.h"
40 #include "platform/Supplementable.h" 41 #include "platform/Supplementable.h"
41 #include "platform/audio/AudioSourceProvider.h" 42 #include "platform/audio/AudioSourceProvider.h"
42 #include "public/platform/WebAudioSourceProviderClient.h" 43 #include "public/platform/WebAudioSourceProviderClient.h"
43 #include "public/platform/WebMediaPlayerClient.h" 44 #include "public/platform/WebMediaPlayerClient.h"
44 #include "public/platform/WebMimeRegistry.h" 45 #include "public/platform/WebMimeRegistry.h"
45 #include <memory> 46 #include <memory>
(...skipping 26 matching lines...) Expand all
72 class VideoTrackList; 73 class VideoTrackList;
73 class WebAudioSourceProvider; 74 class WebAudioSourceProvider;
74 class WebInbandTextTrack; 75 class WebInbandTextTrack;
75 class WebLayer; 76 class WebLayer;
76 class WebRemotePlaybackClient; 77 class WebRemotePlaybackClient;
77 78
78 class CORE_EXPORT HTMLMediaElement : public HTMLElement, 79 class CORE_EXPORT HTMLMediaElement : public HTMLElement,
79 public Supplementable<HTMLMediaElement>, 80 public Supplementable<HTMLMediaElement>,
80 public ActiveScriptWrappable, 81 public ActiveScriptWrappable,
81 public ActiveDOMObject, 82 public ActiveDOMObject,
83 public Fullscreen::FullscreenObserver,
82 private WebMediaPlayerClient { 84 private WebMediaPlayerClient {
83 DEFINE_WRAPPERTYPEINFO(); 85 DEFINE_WRAPPERTYPEINFO();
84 USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement); 86 USING_GARBAGE_COLLECTED_MIXIN(HTMLMediaElement);
85 USING_PRE_FINALIZER(HTMLMediaElement, dispose); 87 USING_PRE_FINALIZER(HTMLMediaElement, dispose);
86 88
87 public: 89 public:
88 static WebMimeRegistry::SupportsType supportsType(const ContentType&); 90 static WebMimeRegistry::SupportsType supportsType(const ContentType&);
89 91
90 enum class RecordMetricsBehavior { DoNotRecord, DoRecord }; 92 enum class RecordMetricsBehavior { DoNotRecord, DoRecord };
91 93
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 void defaultEventHandler(Event*) final; 355 void defaultEventHandler(Event*) final;
354 356
355 // ActiveDOMObject functions. 357 // ActiveDOMObject functions.
356 void contextDestroyed() final; 358 void contextDestroyed() final;
357 359
358 virtual void updateDisplayState() {} 360 virtual void updateDisplayState() {}
359 361
360 void setReadyState(ReadyState); 362 void setReadyState(ReadyState);
361 void setNetworkState(WebMediaPlayer::NetworkState); 363 void setNetworkState(WebMediaPlayer::NetworkState);
362 364
365 // Fullscreen::FullscreenObserver implementation.
366 void onEnteredFullscreen() override;
367 void onExitedFullscreen() override;
368
363 // WebMediaPlayerClient implementation. 369 // WebMediaPlayerClient implementation.
364 void networkStateChanged() final; 370 void networkStateChanged() final;
365 void readyStateChanged() final; 371 void readyStateChanged() final;
366 void timeChanged() final; 372 void timeChanged() final;
367 void repaint() final; 373 void repaint() final;
368 void durationChanged() final; 374 void durationChanged() final;
369 void sizeChanged() final; 375 void sizeChanged() final;
370 void playbackStateChanged() final; 376 void playbackStateChanged() final;
371 377
372 void setWebLayer(WebLayer*) final; 378 void setWebLayer(WebLayer*) final;
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 735
730 inline bool isHTMLMediaElement(const HTMLElement& element) { 736 inline bool isHTMLMediaElement(const HTMLElement& element) {
731 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 737 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
732 } 738 }
733 739
734 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 740 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
735 741
736 } // namespace blink 742 } // namespace blink
737 743
738 #endif // HTMLMediaElement_h 744 #endif // HTMLMediaElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Fullscreen.cpp ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698