| 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 22 matching lines...) Expand all Loading... |
| 33 #include "core/html/shadow/MediaControlElementTypes.h" | 33 #include "core/html/shadow/MediaControlElementTypes.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 // ---------------------------- | 37 // ---------------------------- |
| 38 | 38 |
| 39 class MediaControlPanelElement FINAL : public MediaControlDivElement { | 39 class MediaControlPanelElement FINAL : public MediaControlDivElement { |
| 40 public: | 40 public: |
| 41 static PassRefPtr<MediaControlPanelElement> create(MediaControls&); | 41 static PassRefPtr<MediaControlPanelElement> create(MediaControls&); |
| 42 | 42 |
| 43 void setCanBeDragged(bool); | |
| 44 void setIsDisplayed(bool); | 43 void setIsDisplayed(bool); |
| 45 | 44 |
| 46 void resetPosition(); | |
| 47 void makeOpaque(); | 45 void makeOpaque(); |
| 48 void makeTransparent(); | 46 void makeTransparent(); |
| 49 | 47 |
| 50 virtual bool willRespondToMouseMoveEvents() OVERRIDE { return true; } | |
| 51 virtual bool willRespondToMouseClickEvents() OVERRIDE { return true; } | |
| 52 | |
| 53 private: | 48 private: |
| 54 explicit MediaControlPanelElement(MediaControls&); | 49 explicit MediaControlPanelElement(MediaControls&); |
| 55 | 50 |
| 56 virtual const AtomicString& shadowPseudoId() const OVERRIDE; | 51 virtual const AtomicString& shadowPseudoId() const OVERRIDE; |
| 57 virtual void defaultEventHandler(Event*) OVERRIDE; | |
| 58 | |
| 59 void startDrag(const LayoutPoint& eventLocation); | |
| 60 void continueDrag(const LayoutPoint& eventLocation); | |
| 61 void endDrag(); | |
| 62 | 52 |
| 63 void startTimer(); | 53 void startTimer(); |
| 64 void stopTimer(); | 54 void stopTimer(); |
| 65 void transitionTimerFired(Timer<MediaControlPanelElement>*); | 55 void transitionTimerFired(Timer<MediaControlPanelElement>*); |
| 66 | 56 |
| 67 void setPosition(const LayoutPoint&); | |
| 68 | |
| 69 bool m_canBeDragged; | |
| 70 bool m_isBeingDragged; | |
| 71 bool m_isDisplayed; | 57 bool m_isDisplayed; |
| 72 bool m_opaque; | 58 bool m_opaque; |
| 73 LayoutPoint m_lastDragEventLocation; | |
| 74 LayoutPoint m_cumulativeDragOffset; | |
| 75 | 59 |
| 76 Timer<MediaControlPanelElement> m_transitionTimer; | 60 Timer<MediaControlPanelElement> m_transitionTimer; |
| 77 }; | 61 }; |
| 78 | 62 |
| 79 // ---------------------------- | 63 // ---------------------------- |
| 80 | 64 |
| 81 class MediaControlPanelEnclosureElement FINAL : public MediaControlDivElement { | 65 class MediaControlPanelEnclosureElement FINAL : public MediaControlDivElement { |
| 82 public: | 66 public: |
| 83 static PassRefPtr<MediaControlPanelEnclosureElement> create(MediaControls&); | 67 static PassRefPtr<MediaControlPanelEnclosureElement> create(MediaControls&); |
| 84 | 68 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 237 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
| 254 | 238 |
| 255 IntRect m_videoDisplaySize; | 239 IntRect m_videoDisplaySize; |
| 256 float m_fontSize; | 240 float m_fontSize; |
| 257 }; | 241 }; |
| 258 | 242 |
| 259 | 243 |
| 260 } // namespace WebCore | 244 } // namespace WebCore |
| 261 | 245 |
| 262 #endif // MediaControlElements_h | 246 #endif // MediaControlElements_h |
| OLD | NEW |