OLD | NEW |
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 // ---------------------------- | 73 // ---------------------------- |
74 | 74 |
75 class MediaControlElement : public WillBeGarbageCollectedMixin { | 75 class MediaControlElement : public WillBeGarbageCollectedMixin { |
76 public: | 76 public: |
77 void hide(); | 77 void hide(); |
78 void show(); | 78 void show(); |
79 | 79 |
80 MediaControlElementType displayType() { return m_displayType; } | 80 MediaControlElementType displayType() { return m_displayType; } |
81 | 81 |
| 82 virtual void trace(Visitor*); |
| 83 |
82 protected: | 84 protected: |
83 MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*); | 85 MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*); |
84 | 86 |
85 MediaControls& mediaControls() const { return m_mediaControls; } | 87 MediaControls& mediaControls() const { return m_mediaControls; } |
86 HTMLMediaElement& mediaElement() const; | 88 HTMLMediaElement& mediaElement() const; |
87 | 89 |
88 void setDisplayType(MediaControlElementType); | 90 void setDisplayType(MediaControlElementType); |
89 | 91 |
90 private: | 92 private: |
91 MediaControls& m_mediaControls; | 93 MediaControls& m_mediaControls; |
92 MediaControlElementType m_displayType; | 94 MediaControlElementType m_displayType; |
93 HTMLElement* m_element; | 95 RawPtrWillBeMember<HTMLElement> m_element; |
94 }; | 96 }; |
95 | 97 |
96 // ---------------------------- | 98 // ---------------------------- |
97 | 99 |
98 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement
{ | 100 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement
{ |
99 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlDivElement); | 101 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlDivElement); |
| 102 public: |
| 103 virtual void trace(Visitor*) OVERRIDE; |
100 | 104 |
101 protected: | 105 protected: |
102 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; } | 106 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; } |
103 MediaControlDivElement(MediaControls&, MediaControlElementType); | 107 MediaControlDivElement(MediaControls&, MediaControlElementType); |
104 }; | 108 }; |
105 | 109 |
106 // ---------------------------- | 110 // ---------------------------- |
107 | 111 |
108 class MediaControlInputElement : public HTMLInputElement, public MediaControlEle
ment { | 112 class MediaControlInputElement : public HTMLInputElement, public MediaControlEle
ment { |
109 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlInputElement); | 113 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlInputElement); |
| 114 public: |
| 115 virtual void trace(Visitor*) OVERRIDE; |
110 | 116 |
111 protected: | 117 protected: |
112 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; } | 118 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; } |
113 MediaControlInputElement(MediaControls&, MediaControlElementType); | 119 MediaControlInputElement(MediaControls&, MediaControlElementType); |
114 | 120 |
115 private: | 121 private: |
116 virtual void updateDisplayType() { } | 122 virtual void updateDisplayType() { } |
117 virtual bool isMouseFocusable() const OVERRIDE; | 123 virtual bool isMouseFocusable() const OVERRIDE; |
118 }; | 124 }; |
119 | 125 |
120 // ---------------------------- | 126 // ---------------------------- |
121 | 127 |
122 class MediaControlTimeDisplayElement : public MediaControlDivElement { | 128 class MediaControlTimeDisplayElement : public MediaControlDivElement { |
123 public: | 129 public: |
124 void setCurrentValue(double); | 130 void setCurrentValue(double); |
125 double currentValue() const { return m_currentValue; } | 131 double currentValue() const { return m_currentValue; } |
126 | 132 |
127 protected: | 133 protected: |
128 MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType); | 134 MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType); |
129 | 135 |
130 private: | 136 private: |
131 double m_currentValue; | 137 double m_currentValue; |
132 }; | 138 }; |
133 | 139 |
134 } // namespace WebCore | 140 } // namespace WebCore |
135 | 141 |
136 #endif // MediaControlElementTypes_h | 142 #endif // MediaControlElementTypes_h |
OLD | NEW |