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

Side by Side Diff: Source/core/html/shadow/MediaControlElements.h

Issue 291163004: Implement media cast buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tidy up button name Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights 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 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // ---------------------------- 76 // ----------------------------
77 77
78 class MediaControlOverlayEnclosureElement FINAL : public MediaControlDivElement { 78 class MediaControlOverlayEnclosureElement FINAL : public MediaControlDivElement {
79 public: 79 public:
80 static PassRefPtrWillBeRawPtr<MediaControlOverlayEnclosureElement> create(Me diaControls&); 80 static PassRefPtrWillBeRawPtr<MediaControlOverlayEnclosureElement> create(Me diaControls&);
81 81
82 private: 82 private:
83 explicit MediaControlOverlayEnclosureElement(MediaControls&); 83 explicit MediaControlOverlayEnclosureElement(MediaControls&);
84 virtual const AtomicString& shadowPseudoId() const OVERRIDE; 84 virtual const AtomicString& shadowPseudoId() const OVERRIDE;
85 void* preDispatchEventHandler(Event*) OVERRIDE;
85 }; 86 };
86 87
87 // ---------------------------- 88 // ----------------------------
88 89
89 class MediaControlMuteButtonElement FINAL : public MediaControlInputElement { 90 class MediaControlMuteButtonElement FINAL : public MediaControlInputElement {
90 public: 91 public:
91 static PassRefPtrWillBeRawPtr<MediaControlMuteButtonElement> create(MediaCon trols&); 92 static PassRefPtrWillBeRawPtr<MediaControlMuteButtonElement> create(MediaCon trols&);
92 93
93 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } 94 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }
94 virtual void updateDisplayType() OVERRIDE; 95 virtual void updateDisplayType() OVERRIDE;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 183
183 private: 184 private:
184 explicit MediaControlFullscreenButtonElement(MediaControls&); 185 explicit MediaControlFullscreenButtonElement(MediaControls&);
185 186
186 virtual const AtomicString& shadowPseudoId() const OVERRIDE; 187 virtual const AtomicString& shadowPseudoId() const OVERRIDE;
187 virtual void defaultEventHandler(Event*) OVERRIDE; 188 virtual void defaultEventHandler(Event*) OVERRIDE;
188 }; 189 };
189 190
190 // ---------------------------- 191 // ----------------------------
191 192
193 class MediaControlCastButtonElement FINAL : public MediaControlInputElement {
194 public:
195 static PassRefPtrWillBeRawPtr<MediaControlCastButtonElement> create(MediaCon trols&);
196
197 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }
198
199 void setIsCasting(bool);
200
201 private:
202 explicit MediaControlCastButtonElement(MediaControls&);
203
204 virtual const AtomicString& shadowPseudoId() const OVERRIDE;
205 virtual void defaultEventHandler(Event*) OVERRIDE;
206 };
207
208 // ----------------------------
209 class MediaControlOverlayCastButtonElement FINAL : public MediaControlInputEleme nt {
210 public:
211 static PassRefPtrWillBeRawPtr<MediaControlOverlayCastButtonElement> create(M ediaControls&);
212
213 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; }
214
215 void setIsCasting(bool);
216
217 private:
218 explicit MediaControlOverlayCastButtonElement(MediaControls&);
219
220 virtual const AtomicString& shadowPseudoId() const OVERRIDE;
221 virtual void defaultEventHandler(Event*) OVERRIDE;
222 virtual bool keepEventInNode(Event*) OVERRIDE;
223 };
224
225 // ----------------------------
226
192 class MediaControlVolumeSliderElement FINAL : public MediaControlInputElement { 227 class MediaControlVolumeSliderElement FINAL : public MediaControlInputElement {
193 public: 228 public:
194 static PassRefPtrWillBeRawPtr<MediaControlVolumeSliderElement> create(MediaC ontrols&); 229 static PassRefPtrWillBeRawPtr<MediaControlVolumeSliderElement> create(MediaC ontrols&);
195 230
196 virtual bool willRespondToMouseMoveEvents() OVERRIDE; 231 virtual bool willRespondToMouseMoveEvents() OVERRIDE;
197 virtual bool willRespondToMouseClickEvents() OVERRIDE; 232 virtual bool willRespondToMouseClickEvents() OVERRIDE;
198 void setVolume(double); 233 void setVolume(double);
199 234
200 private: 235 private:
201 explicit MediaControlVolumeSliderElement(MediaControls&); 236 explicit MediaControlVolumeSliderElement(MediaControls&);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; 279 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE;
245 280
246 IntRect m_videoDisplaySize; 281 IntRect m_videoDisplaySize;
247 float m_fontSize; 282 float m_fontSize;
248 }; 283 };
249 284
250 285
251 } // namespace blink 286 } // namespace blink
252 287
253 #endif // MediaControlElements_h 288 #endif // MediaControlElements_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698