| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 MediaControllerInterface* m_mediaController; | 100 MediaControllerInterface* m_mediaController; |
| 101 MediaControlElementType m_displayType; | 101 MediaControlElementType m_displayType; |
| 102 HTMLElement* m_element; | 102 HTMLElement* m_element; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 // ---------------------------- | 105 // ---------------------------- |
| 106 | 106 |
| 107 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement
{ | 107 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement
{ |
| 108 protected: | 108 protected: |
| 109 virtual bool isMediaControlElement() const OVERRIDE { return MediaControlEle
ment::isMediaControlElement(); } | 109 virtual bool isMediaControlElement() const OVERRIDE { return MediaControlEle
ment::isMediaControlElement(); } |
| 110 explicit MediaControlDivElement(Document*, MediaControlElementType); | 110 explicit MediaControlDivElement(Document&, MediaControlElementType); |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 // ---------------------------- | 113 // ---------------------------- |
| 114 | 114 |
| 115 class MediaControlInputElement : public HTMLInputElement, public MediaControlEle
ment { | 115 class MediaControlInputElement : public HTMLInputElement, public MediaControlEle
ment { |
| 116 protected: | 116 protected: |
| 117 virtual bool isMediaControlElement() const OVERRIDE { return MediaControlEle
ment::isMediaControlElement(); } | 117 virtual bool isMediaControlElement() const OVERRIDE { return MediaControlEle
ment::isMediaControlElement(); } |
| 118 explicit MediaControlInputElement(Document*, MediaControlElementType); | 118 explicit MediaControlInputElement(Document&, MediaControlElementType); |
| 119 | 119 |
| 120 private: | 120 private: |
| 121 virtual void updateDisplayType() { } | 121 virtual void updateDisplayType() { } |
| 122 virtual bool isMouseFocusable() const OVERRIDE; | 122 virtual bool isMouseFocusable() const OVERRIDE; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 // ---------------------------- | 125 // ---------------------------- |
| 126 | 126 |
| 127 class MediaControlTimeDisplayElement : public MediaControlDivElement { | 127 class MediaControlTimeDisplayElement : public MediaControlDivElement { |
| 128 public: | 128 public: |
| 129 void setCurrentValue(double); | 129 void setCurrentValue(double); |
| 130 double currentValue() const { return m_currentValue; } | 130 double currentValue() const { return m_currentValue; } |
| 131 | 131 |
| 132 protected: | 132 protected: |
| 133 explicit MediaControlTimeDisplayElement(Document*, MediaControlElementType); | 133 explicit MediaControlTimeDisplayElement(Document&, MediaControlElementType); |
| 134 | 134 |
| 135 private: | 135 private: |
| 136 double m_currentValue; | 136 double m_currentValue; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 // ---------------------------- | 139 // ---------------------------- |
| 140 | 140 |
| 141 class MediaControlMuteButtonElement : public MediaControlInputElement { | 141 class MediaControlMuteButtonElement : public MediaControlInputElement { |
| 142 public: | 142 public: |
| 143 void changedMute(); | 143 void changedMute(); |
| 144 | 144 |
| 145 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } | 145 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } |
| 146 | 146 |
| 147 protected: | 147 protected: |
| 148 explicit MediaControlMuteButtonElement(Document*, MediaControlElementType); | 148 explicit MediaControlMuteButtonElement(Document&, MediaControlElementType); |
| 149 | 149 |
| 150 virtual void defaultEventHandler(Event*) OVERRIDE; | 150 virtual void defaultEventHandler(Event*) OVERRIDE; |
| 151 | 151 |
| 152 private: | 152 private: |
| 153 virtual void updateDisplayType() OVERRIDE; | 153 virtual void updateDisplayType() OVERRIDE; |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 // ---------------------------- | 156 // ---------------------------- |
| 157 | 157 |
| 158 class MediaControlVolumeSliderElement : public MediaControlInputElement { | 158 class MediaControlVolumeSliderElement : public MediaControlInputElement { |
| 159 public: | 159 public: |
| 160 virtual bool willRespondToMouseMoveEvents() OVERRIDE; | 160 virtual bool willRespondToMouseMoveEvents() OVERRIDE; |
| 161 virtual bool willRespondToMouseClickEvents() OVERRIDE; | 161 virtual bool willRespondToMouseClickEvents() OVERRIDE; |
| 162 void setVolume(double); | 162 void setVolume(double); |
| 163 void setClearMutedOnUserInteraction(bool); | 163 void setClearMutedOnUserInteraction(bool); |
| 164 | 164 |
| 165 protected: | 165 protected: |
| 166 explicit MediaControlVolumeSliderElement(Document*); | 166 explicit MediaControlVolumeSliderElement(Document&); |
| 167 | 167 |
| 168 virtual void defaultEventHandler(Event*) OVERRIDE; | 168 virtual void defaultEventHandler(Event*) OVERRIDE; |
| 169 | 169 |
| 170 private: | 170 private: |
| 171 bool m_clearMutedOnUserInteraction; | 171 bool m_clearMutedOnUserInteraction; |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 } // namespace WebCore | 174 } // namespace WebCore |
| 175 | 175 |
| 176 #endif // MediaControlElementTypes_h | 176 #endif // MediaControlElementTypes_h |
| OLD | NEW |