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

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: Addressed liberato's comments. Changed to use HTMLDivElement instead of HTMLInputElement. 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 MediaRemotingStatus { kNotStarted, kStarted, kDisabled };
mlamouri (slow - plz ping) 2017/04/13 17:20:51 Can you make this an enum class?
xjz 2017/04/13 19:12:11 Done.
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 EventTarget&, 126 EventTarget&,
124 Optional<IntRect> crop_rect, 127 Optional<IntRect> crop_rect,
125 const ImageBitmapOptions&, 128 const ImageBitmapOptions&,
126 ExceptionState&) override; 129 ExceptionState&) override;
127 130
128 // WebMediaPlayerClient implementation. 131 // WebMediaPlayerClient implementation.
129 void OnBecamePersistentVideo(bool) final; 132 void OnBecamePersistentVideo(bool) final;
130 133
131 bool IsPersistent() const; 134 bool IsPersistent() const;
132 135
136 MediaRemotingStatus GetMediaRemotingStatus() const {
miu 2017/04/13 01:32:10 style nit: Inline accessors should be in lowercase
mlamouri (slow - plz ping) 2017/04/13 17:20:51 Unfortunately, this isn't true in Blink even after
xjz 2017/04/13 19:12:11 Thanks for clarification.
xjz 2017/04/13 19:12:11 Kept it unchanged according to the Blink style.
137 return media_remoting_status_;
138 }
139 void DisableMediaRemoting();
140
133 private: 141 private:
134 friend class MediaCustomControlsFullscreenDetectorTest; 142 friend class MediaCustomControlsFullscreenDetectorTest;
135 friend class HTMLMediaElementEventListenersTest; 143 friend class HTMLMediaElementEventListenersTest;
136 friend class HTMLVideoElementPersistentTest; 144 friend class HTMLVideoElementPersistentTest;
137 145
138 HTMLVideoElement(Document&); 146 HTMLVideoElement(Document&);
139 147
140 // SuspendableObject functions. 148 // SuspendableObject functions.
141 void ContextDestroyed(ExecutionContext*) final; 149 void ContextDestroyed(ExecutionContext*) final;
142 150
143 bool LayoutObjectIsNeeded(const ComputedStyle&) override; 151 bool LayoutObjectIsNeeded(const ComputedStyle&) override;
144 LayoutObject* CreateLayoutObject(const ComputedStyle&) override; 152 LayoutObject* CreateLayoutObject(const ComputedStyle&) override;
145 void AttachLayoutTree(const AttachContext& = AttachContext()) override; 153 void AttachLayoutTree(const AttachContext& = AttachContext()) override;
146 void ParseAttribute(const AttributeModificationParams&) override; 154 void ParseAttribute(const AttributeModificationParams&) override;
147 bool IsPresentationAttribute(const QualifiedName&) const override; 155 bool IsPresentationAttribute(const QualifiedName&) const override;
148 void CollectStyleForPresentationAttribute(const QualifiedName&, 156 void CollectStyleForPresentationAttribute(const QualifiedName&,
149 const AtomicString&, 157 const AtomicString&,
150 MutableStylePropertySet*) override; 158 MutableStylePropertySet*) override;
151 bool IsURLAttribute(const Attribute&) const override; 159 bool IsURLAttribute(const Attribute&) const override;
152 const AtomicString ImageSourceURL() const override; 160 const AtomicString ImageSourceURL() const override;
153 161
154 void UpdateDisplayState() override; 162 void UpdateDisplayState() override;
155 void DidMoveToNewDocument(Document& old_document) override; 163 void DidMoveToNewDocument(Document& old_document) override;
156 void SetDisplayMode(DisplayMode) override; 164 void SetDisplayMode(DisplayMode) override;
165 void MediaRemotingStarted() final;
166 void MediaRemotingStopped() final;
157 167
158 Member<HTMLImageLoader> image_loader_; 168 Member<HTMLImageLoader> image_loader_;
159 Member<MediaCustomControlsFullscreenDetector> 169 Member<MediaCustomControlsFullscreenDetector>
160 custom_controls_fullscreen_detector_; 170 custom_controls_fullscreen_detector_;
161 171
172 MediaRemotingStatus media_remoting_status_;
173
174 Member<MediaRemotingInterstitial> remoting_interstitial_;
175
162 AtomicString default_poster_url_; 176 AtomicString default_poster_url_;
163 177
164 bool is_persistent_ = false; 178 bool is_persistent_ = false;
165 }; 179 };
166 180
167 } // namespace blink 181 } // namespace blink
168 182
169 #endif // HTMLVideoElement_h 183 #endif // HTMLVideoElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698