| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 class MediaControlElement { | 80 class MediaControlElement { |
| 81 public: | 81 public: |
| 82 virtual void hide(); | 82 virtual void hide(); |
| 83 virtual void show(); | 83 virtual void show(); |
| 84 virtual bool isShowing() const; | 84 virtual bool isShowing() const; |
| 85 | 85 |
| 86 virtual MediaControlElementType displayType() { return m_displayType; } | 86 virtual MediaControlElementType displayType() { return m_displayType; } |
| 87 virtual const AtomicString& shadowPseudoId() const = 0; | 87 virtual const AtomicString& shadowPseudoId() const = 0; |
| 88 | 88 |
| 89 virtual void setMediaController(MediaControllerInterface* controller) { m_me
diaController = controller; } | 89 virtual void setMediaController(MediaControllerInterface* controller) { m_me
diaController = controller; } |
| 90 virtual MediaControllerInterface* mediaController() const { return m_mediaCo
ntroller; } | 90 MediaControllerInterface* mediaController() const { return m_mediaController
; } |
| 91 | 91 |
| 92 protected: | 92 protected: |
| 93 explicit MediaControlElement(MediaControlElementType, HTMLElement*); | 93 explicit MediaControlElement(MediaControlElementType, HTMLElement*); |
| 94 ~MediaControlElement() { } | 94 ~MediaControlElement() { } |
| 95 | 95 |
| 96 virtual void setDisplayType(MediaControlElementType); | 96 virtual void setDisplayType(MediaControlElementType); |
| 97 virtual bool isMediaControlElement() const { return true; } | |
| 98 | 97 |
| 99 private: | 98 private: |
| 100 MediaControllerInterface* m_mediaController; | 99 MediaControllerInterface* m_mediaController; |
| 101 MediaControlElementType m_displayType; | 100 MediaControlElementType m_displayType; |
| 102 HTMLElement* m_element; | 101 HTMLElement* m_element; |
| 103 }; | 102 }; |
| 104 | 103 |
| 105 // ---------------------------- | 104 // ---------------------------- |
| 106 | 105 |
| 107 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement
{ | 106 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement
{ |
| 108 protected: | 107 protected: |
| 109 virtual bool isMediaControlElement() const OVERRIDE { return MediaControlEle
ment::isMediaControlElement(); } | 108 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; } |
| 110 explicit MediaControlDivElement(Document&, MediaControlElementType); | 109 explicit MediaControlDivElement(Document&, MediaControlElementType); |
| 111 }; | 110 }; |
| 112 | 111 |
| 113 // ---------------------------- | 112 // ---------------------------- |
| 114 | 113 |
| 115 class MediaControlInputElement : public HTMLInputElement, public MediaControlEle
ment { | 114 class MediaControlInputElement : public HTMLInputElement, public MediaControlEle
ment { |
| 116 protected: | 115 protected: |
| 117 virtual bool isMediaControlElement() const OVERRIDE { return MediaControlEle
ment::isMediaControlElement(); } | 116 virtual bool isMediaControlElement() const OVERRIDE FINAL { return true; } |
| 118 explicit MediaControlInputElement(Document&, MediaControlElementType); | 117 explicit MediaControlInputElement(Document&, MediaControlElementType); |
| 119 | 118 |
| 120 private: | 119 private: |
| 121 virtual void updateDisplayType() { } | 120 virtual void updateDisplayType() { } |
| 122 virtual bool isMouseFocusable() const OVERRIDE; | 121 virtual bool isMouseFocusable() const OVERRIDE; |
| 123 }; | 122 }; |
| 124 | 123 |
| 125 // ---------------------------- | 124 // ---------------------------- |
| 126 | 125 |
| 127 class MediaControlTimeDisplayElement : public MediaControlDivElement { | 126 class MediaControlTimeDisplayElement : public MediaControlDivElement { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 166 |
| 168 virtual void defaultEventHandler(Event*) OVERRIDE; | 167 virtual void defaultEventHandler(Event*) OVERRIDE; |
| 169 | 168 |
| 170 private: | 169 private: |
| 171 bool m_clearMutedOnUserInteraction; | 170 bool m_clearMutedOnUserInteraction; |
| 172 }; | 171 }; |
| 173 | 172 |
| 174 } // namespace WebCore | 173 } // namespace WebCore |
| 175 | 174 |
| 176 #endif // MediaControlElementTypes_h | 175 #endif // MediaControlElementTypes_h |
| OLD | NEW |