| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "core/html/track/TextTrack.h" | 35 #include "core/html/track/TextTrack.h" |
| 36 #include "platform/Timer.h" | 36 #include "platform/Timer.h" |
| 37 #include "platform/geometry/FloatPoint.h" | 37 #include "platform/geometry/FloatPoint.h" |
| 38 #include "wtf/PassOwnPtr.h" | 38 #include "wtf/PassOwnPtr.h" |
| 39 #include "wtf/RefCounted.h" | 39 #include "wtf/RefCounted.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 class ExceptionState; | 43 class ExceptionState; |
| 44 class HTMLDivElement; | 44 class HTMLDivElement; |
| 45 class TextTrackCueBox; | 45 class VTTCueBox; |
| 46 | 46 |
| 47 class VTTRegion : public RefCounted<VTTRegion> { | 47 class VTTRegion : public RefCounted<VTTRegion> { |
| 48 public: | 48 public: |
| 49 static PassRefPtr<VTTRegion> create() | 49 static PassRefPtr<VTTRegion> create() |
| 50 { | 50 { |
| 51 return adoptRef(new VTTRegion()); | 51 return adoptRef(new VTTRegion()); |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual ~VTTRegion(); | 54 virtual ~VTTRegion(); |
| 55 | 55 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 82 | 82 |
| 83 void updateParametersFromRegion(VTTRegion*); | 83 void updateParametersFromRegion(VTTRegion*); |
| 84 | 84 |
| 85 const String& regionSettings() const { return m_settings; } | 85 const String& regionSettings() const { return m_settings; } |
| 86 void setRegionSettings(const String&); | 86 void setRegionSettings(const String&); |
| 87 | 87 |
| 88 bool isScrollingRegion() { return m_scroll; } | 88 bool isScrollingRegion() { return m_scroll; } |
| 89 | 89 |
| 90 PassRefPtr<HTMLDivElement> getDisplayTree(Document&); | 90 PassRefPtr<HTMLDivElement> getDisplayTree(Document&); |
| 91 | 91 |
| 92 void appendTextTrackCueBox(PassRefPtr<TextTrackCueBox>); | 92 void appendVTTCueBox(PassRefPtr<VTTCueBox>); |
| 93 void displayLastTextTrackCueBox(); | 93 void displayLastVTTCueBox(); |
| 94 void willRemoveTextTrackCueBox(TextTrackCueBox*); | 94 void willRemoveVTTCueBox(VTTCueBox*); |
| 95 | 95 |
| 96 private: | 96 private: |
| 97 VTTRegion(); | 97 VTTRegion(); |
| 98 | 98 |
| 99 void prepareRegionDisplayTree(); | 99 void prepareRegionDisplayTree(); |
| 100 | 100 |
| 101 // The timer is needed to continue processing when cue scrolling ended. | 101 // The timer is needed to continue processing when cue scrolling ended. |
| 102 void startTimer(); | 102 void startTimer(); |
| 103 void stopTimer(); | 103 void stopTimer(); |
| 104 void scrollTimerFired(Timer<VTTRegion>*); | 104 void scrollTimerFired(Timer<VTTRegion>*); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // The timer is used to display the next cue line after the current one has | 145 // The timer is used to display the next cue line after the current one has |
| 146 // been displayed. It's main use is for scrolling regions and it triggers as | 146 // been displayed. It's main use is for scrolling regions and it triggers as |
| 147 // soon as the animation for rolling out one line has finished, but | 147 // soon as the animation for rolling out one line has finished, but |
| 148 // currently it is used also for non-scrolling regions to use a single | 148 // currently it is used also for non-scrolling regions to use a single |
| 149 // code path. | 149 // code path. |
| 150 Timer<VTTRegion> m_scrollTimer; | 150 Timer<VTTRegion> m_scrollTimer; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 } // namespace WebCore | 153 } // namespace WebCore |
| 154 #endif | 154 #endif |
| OLD | NEW |