Chromium Code Reviews| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 // needed, also. | 85 // needed, also. |
| 86 void setDoesFit(bool); | 86 void setDoesFit(bool); |
| 87 | 87 |
| 88 MediaControlElementType displayType() { return m_displayType; } | 88 MediaControlElementType displayType() { return m_displayType; } |
| 89 | 89 |
| 90 DECLARE_VIRTUAL_TRACE(); | 90 DECLARE_VIRTUAL_TRACE(); |
| 91 | 91 |
| 92 protected: | 92 protected: |
| 93 MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*); | 93 MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*); |
| 94 | 94 |
| 95 MediaControls& mediaControls() const { return m_mediaControls; } | 95 MediaControls& mediaControls() const |
| 96 { | |
| 97 ASSERT(m_mediaControls); | |
| 98 return *m_mediaControls; | |
| 99 } | |
| 96 HTMLMediaElement& mediaElement() const; | 100 HTMLMediaElement& mediaElement() const; |
| 97 | 101 |
| 98 void setDisplayType(MediaControlElementType); | 102 void setDisplayType(MediaControlElementType); |
| 99 | 103 |
| 100 private: | 104 private: |
| 101 // Hide or show based on our fits / wanted state. We want to show | 105 // Hide or show based on our fits / wanted state. We want to show |
| 102 // if and only if we're wanted and we fit. | 106 // if and only if we're wanted and we fit. |
| 103 void updateShownState(); | 107 void updateShownState(); |
| 104 | 108 |
| 105 MediaControls& m_mediaControls; | 109 RawPtrWillBeMember<MediaControls> m_mediaControls; |
|
sof
2015/08/07 05:13:23
Notice that the removal of raw pointer effort does
| |
| 106 MediaControlElementType m_displayType; | 110 MediaControlElementType m_displayType; |
| 107 RawPtrWillBeMember<HTMLElement> m_element; | 111 RawPtrWillBeMember<HTMLElement> m_element; |
| 108 bool m_isWanted : 1; | 112 bool m_isWanted : 1; |
| 109 bool m_doesFit : 1; | 113 bool m_doesFit : 1; |
| 110 }; | 114 }; |
| 111 | 115 |
| 112 // ---------------------------- | 116 // ---------------------------- |
| 113 | 117 |
| 114 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement { | 118 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement { |
| 115 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlDivElement); | 119 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlDivElement); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 protected: | 153 protected: |
| 150 MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType); | 154 MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType); |
| 151 | 155 |
| 152 private: | 156 private: |
| 153 double m_currentValue; | 157 double m_currentValue; |
| 154 }; | 158 }; |
| 155 | 159 |
| 156 } // namespace blink | 160 } // namespace blink |
| 157 | 161 |
| 158 #endif // MediaControlElementTypes_h | 162 #endif // MediaControlElementTypes_h |
| OLD | NEW |