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

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

Issue 406213002: If the media controls are visible they should always grab clicks (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing comment Created 6 years, 5 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 virtual void trace(Visitor*); 82 virtual void trace(Visitor*);
83 83
84 protected: 84 protected:
85 MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*); 85 MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*);
86 86
87 MediaControls& mediaControls() const { return m_mediaControls; } 87 MediaControls& mediaControls() const { return m_mediaControls; }
88 HTMLMediaElement& mediaElement() const; 88 HTMLMediaElement& mediaElement() const;
89 89
90 void setDisplayType(MediaControlElementType); 90 void setDisplayType(MediaControlElementType);
91 91
92 bool isHidden() const { return m_isHidden; }
93
92 private: 94 private:
93 MediaControls& m_mediaControls; 95 MediaControls& m_mediaControls;
94 MediaControlElementType m_displayType; 96 MediaControlElementType m_displayType;
95 RawPtrWillBeMember<HTMLElement> m_element; 97 RawPtrWillBeMember<HTMLElement> m_element;
98 bool m_isHidden;
96 }; 99 };
97 100
98 // ---------------------------- 101 // ----------------------------
99 102
100 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement { 103 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement {
101 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlDivElement); 104 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlDivElement);
102 public: 105 public:
103 virtual void trace(Visitor*) OVERRIDE; 106 virtual void trace(Visitor*) OVERRIDE;
104 107
105 protected: 108 protected:
106 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; } 109 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; }
107 MediaControlDivElement(MediaControls&, MediaControlElementType); 110 MediaControlDivElement(MediaControls&, MediaControlElementType);
108 }; 111 };
109 112
110 // ---------------------------- 113 // ----------------------------
111 114
112 class MediaControlInputElement : public HTMLInputElement, public MediaControlEle ment { 115 class MediaControlInputElement : public HTMLInputElement, public MediaControlEle ment {
113 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlInputElement); 116 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlInputElement);
114 public: 117 public:
115 virtual void trace(Visitor*) OVERRIDE; 118 virtual void trace(Visitor*) OVERRIDE;
116 119
117 protected: 120 protected:
118 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; } 121 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; }
119 MediaControlInputElement(MediaControls&, MediaControlElementType); 122 MediaControlInputElement(MediaControls&, MediaControlElementType);
120
philipj_slow 2014/07/22 12:56:24 Accidental removal?
121 private: 123 private:
122 virtual void updateDisplayType() { } 124 virtual void updateDisplayType() { }
123 virtual bool isMouseFocusable() const OVERRIDE; 125 virtual bool isMouseFocusable() const OVERRIDE;
126 void * preDispatchEventHandler(Event*) OVERRIDE FINAL;
philipj_slow 2014/07/22 12:56:24 extra space
124 }; 127 };
125 128
126 // ---------------------------- 129 // ----------------------------
127 130
128 class MediaControlTimeDisplayElement : public MediaControlDivElement { 131 class MediaControlTimeDisplayElement : public MediaControlDivElement {
129 public: 132 public:
130 void setCurrentValue(double); 133 void setCurrentValue(double);
131 double currentValue() const { return m_currentValue; } 134 double currentValue() const { return m_currentValue; }
132 135
133 protected: 136 protected:
134 MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType); 137 MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType);
135 138
136 private: 139 private:
137 double m_currentValue; 140 double m_currentValue;
138 }; 141 };
139 142
140 } // namespace blink 143 } // namespace blink
141 144
142 #endif // MediaControlElementTypes_h 145 #endif // MediaControlElementTypes_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698