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

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

Issue 2767823002: Media Remoting: Add interstitial elements to media element shadow dom. (Closed)
Patch Set: Rebased. Created 3 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010 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 25 matching lines...) Expand all
36 namespace gpu { 36 namespace gpu {
37 namespace gles2 { 37 namespace gles2 {
38 class GLES2Interface; 38 class GLES2Interface;
39 } 39 }
40 } 40 }
41 41
42 namespace blink { 42 namespace blink {
43 class ExceptionState; 43 class ExceptionState;
44 class ImageBitmapOptions; 44 class ImageBitmapOptions;
45 class MediaCustomControlsFullscreenDetector; 45 class MediaCustomControlsFullscreenDetector;
46 class MediaRemotingInterstitial;
46 47
47 class CORE_EXPORT HTMLVideoElement final : public HTMLMediaElement, 48 class CORE_EXPORT HTMLVideoElement final : public HTMLMediaElement,
48 public CanvasImageSource, 49 public CanvasImageSource,
49 public ImageBitmapSource { 50 public ImageBitmapSource {
50 DEFINE_WRAPPERTYPEINFO(); 51 DEFINE_WRAPPERTYPEINFO();
51 52
52 public: 53 public:
53 static HTMLVideoElement* Create(Document&); 54 static HTMLVideoElement* Create(Document&);
54 DECLARE_VIRTUAL_TRACE(); 55 DECLARE_VIRTUAL_TRACE();
55 56
57 enum class MediaRemotingStatus { kNotStarted, kStarted, kDisabled };
58
56 // Node override. 59 // Node override.
57 Node::InsertionNotificationRequest InsertedInto(ContainerNode*) override; 60 Node::InsertionNotificationRequest InsertedInto(ContainerNode*) override;
58 void RemovedFrom(ContainerNode*) override; 61 void RemovedFrom(ContainerNode*) override;
59 62
60 unsigned videoWidth() const; 63 unsigned videoWidth() const;
61 unsigned videoHeight() const; 64 unsigned videoHeight() const;
62 65
63 // Fullscreen 66 // Fullscreen
64 void webkitEnterFullscreen(); 67 void webkitEnterFullscreen();
65 void webkitExitFullscreen(); 68 void webkitExitFullscreen();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 EventTarget&, 128 EventTarget&,
126 Optional<IntRect> crop_rect, 129 Optional<IntRect> crop_rect,
127 const ImageBitmapOptions&, 130 const ImageBitmapOptions&,
128 ExceptionState&) override; 131 ExceptionState&) override;
129 132
130 // WebMediaPlayerClient implementation. 133 // WebMediaPlayerClient implementation.
131 void OnBecamePersistentVideo(bool) final; 134 void OnBecamePersistentVideo(bool) final;
132 135
133 bool IsPersistent() const; 136 bool IsPersistent() const;
134 137
138 MediaRemotingStatus GetMediaRemotingStatus() const {
139 return media_remoting_status_;
140 }
141 void DisableMediaRemoting();
142
135 private: 143 private:
136 friend class MediaCustomControlsFullscreenDetectorTest; 144 friend class MediaCustomControlsFullscreenDetectorTest;
137 friend class HTMLMediaElementEventListenersTest; 145 friend class HTMLMediaElementEventListenersTest;
138 friend class HTMLVideoElementPersistentTest; 146 friend class HTMLVideoElementPersistentTest;
139 147
140 HTMLVideoElement(Document&); 148 HTMLVideoElement(Document&);
141 149
142 // SuspendableObject functions. 150 // SuspendableObject functions.
143 void ContextDestroyed(ExecutionContext*) final; 151 void ContextDestroyed(ExecutionContext*) final;
144 152
145 bool LayoutObjectIsNeeded(const ComputedStyle&) override; 153 bool LayoutObjectIsNeeded(const ComputedStyle&) override;
146 LayoutObject* CreateLayoutObject(const ComputedStyle&) override; 154 LayoutObject* CreateLayoutObject(const ComputedStyle&) override;
147 void AttachLayoutTree(const AttachContext& = AttachContext()) override; 155 void AttachLayoutTree(const AttachContext& = AttachContext()) override;
148 void ParseAttribute(const AttributeModificationParams&) override; 156 void ParseAttribute(const AttributeModificationParams&) override;
149 bool IsPresentationAttribute(const QualifiedName&) const override; 157 bool IsPresentationAttribute(const QualifiedName&) const override;
150 void CollectStyleForPresentationAttribute(const QualifiedName&, 158 void CollectStyleForPresentationAttribute(const QualifiedName&,
151 const AtomicString&, 159 const AtomicString&,
152 MutableStylePropertySet*) override; 160 MutableStylePropertySet*) override;
153 bool IsURLAttribute(const Attribute&) const override; 161 bool IsURLAttribute(const Attribute&) const override;
154 const AtomicString ImageSourceURL() const override; 162 const AtomicString ImageSourceURL() const override;
155 163
156 void UpdateDisplayState() override; 164 void UpdateDisplayState() override;
157 void DidMoveToNewDocument(Document& old_document) override; 165 void DidMoveToNewDocument(Document& old_document) override;
158 void SetDisplayMode(DisplayMode) override; 166 void SetDisplayMode(DisplayMode) override;
167 void MediaRemotingStarted() final;
168 void MediaRemotingStopped() final;
159 169
160 Member<HTMLImageLoader> image_loader_; 170 Member<HTMLImageLoader> image_loader_;
161 Member<MediaCustomControlsFullscreenDetector> 171 Member<MediaCustomControlsFullscreenDetector>
162 custom_controls_fullscreen_detector_; 172 custom_controls_fullscreen_detector_;
163 173
174 MediaRemotingStatus media_remoting_status_;
175
176 Member<MediaRemotingInterstitial> remoting_interstitial_;
177
164 AtomicString default_poster_url_; 178 AtomicString default_poster_url_;
165 179
166 bool is_persistent_ = false; 180 bool is_persistent_ = false;
167 }; 181 };
168 182
169 } // namespace blink 183 } // namespace blink
170 184
171 #endif // HTMLVideoElement_h 185 #endif // HTMLVideoElement_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLVideoElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698