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

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

Issue 1156993013: New media playback UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: manual rebaseline. Created 5 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 inline HTMLMediaElement* toParentMediaElement(LayoutObject* layoutObject) { retu rn toParentMediaElement(layoutObject->node()); } 71 inline HTMLMediaElement* toParentMediaElement(LayoutObject* layoutObject) { retu rn toParentMediaElement(layoutObject->node()); }
72 72
73 CORE_EXPORT MediaControlElementType mediaControlElementType(Node*); 73 CORE_EXPORT MediaControlElementType mediaControlElementType(Node*);
74 74
75 // ---------------------------- 75 // ----------------------------
76 76
77 class MediaControlElement : public WillBeGarbageCollectedMixin { 77 class MediaControlElement : public WillBeGarbageCollectedMixin {
78 public: 78 public:
79 void hide(); 79 void hide();
80 void show(); 80 void show();
81 bool isShown();
82
83 // These hold the state about whether this control should be shown if
philipj_slow 2015/07/08 15:06:38 OK, I take it the problem is that there are now tw
liberato (no reviews please) 2015/07/09 12:10:56 originally, i tried to keep the state in MediaCont
84 // space permits. These will also show / hide as needed, though
85 // calling show/hide does not impact the want/dontWant state.
86 void want();
87 void dontWant();
88 bool isWanted();
89
90 // This returns the minimum width in pixels that we need to show
91 // this control. Ideally, this would just be shorthand for the css
philipj_slow 2015/07/08 15:06:38 s/css attributes/computed style/
liberato (no reviews please) 2015/07/09 12:10:56 Done.
92 // attributes, but this must also work when the control is hidden.
93 int minimumWidth();
81 94
82 MediaControlElementType displayType() { return m_displayType; } 95 MediaControlElementType displayType() { return m_displayType; }
83 96
84 DECLARE_VIRTUAL_TRACE(); 97 DECLARE_VIRTUAL_TRACE();
85 98
86 protected: 99 protected:
87 MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*); 100 MediaControlElement(MediaControls&, MediaControlElementType, HTMLElement*);
88 101
89 MediaControls& mediaControls() const { return m_mediaControls; } 102 MediaControls& mediaControls() const { return m_mediaControls; }
90 HTMLMediaElement& mediaElement() const; 103 HTMLMediaElement& mediaElement() const;
91 104
92 void setDisplayType(MediaControlElementType); 105 void setDisplayType(MediaControlElementType);
93 106
94 private: 107 private:
95 MediaControls& m_mediaControls; 108 MediaControls& m_mediaControls;
96 MediaControlElementType m_displayType; 109 MediaControlElementType m_displayType;
97 RawPtrWillBeMember<HTMLElement> m_element; 110 RawPtrWillBeMember<HTMLElement> m_element;
111 bool m_isShown;
112 bool m_isWanted;
98 }; 113 };
99 114
100 // ---------------------------- 115 // ----------------------------
101 116
102 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement { 117 class MediaControlDivElement : public HTMLDivElement, public MediaControlElement {
103 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlDivElement); 118 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MediaControlDivElement);
104 public: 119 public:
105 DECLARE_VIRTUAL_TRACE(); 120 DECLARE_VIRTUAL_TRACE();
106 121
107 protected: 122 protected:
(...skipping 29 matching lines...) Expand all
137 protected: 152 protected:
138 MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType); 153 MediaControlTimeDisplayElement(MediaControls&, MediaControlElementType);
139 154
140 private: 155 private:
141 double m_currentValue; 156 double m_currentValue;
142 }; 157 };
143 158
144 } // namespace blink 159 } // namespace blink
145 160
146 #endif // MediaControlElementTypes_h 161 #endif // MediaControlElementTypes_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698