| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef TimeRanges_h | 26 #ifndef TimeRanges_h |
| 27 #define TimeRanges_h | 27 #define TimeRanges_h |
| 28 | 28 |
| 29 #include "bindings/core/v8/ScriptWrappable.h" | 29 #include "bindings/core/v8/ScriptWrappable.h" |
| 30 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
| 31 #include "platform/heap/Handle.h" | 31 #include "platform/heap/Handle.h" |
| 32 #include "public/platform/WebTimeRange.h" | 32 #include "public/platform/WebTimeRange.h" |
| 33 #include "wtf/Allocator.h" |
| 33 #include "wtf/Vector.h" | 34 #include "wtf/Vector.h" |
| 34 | 35 |
| 35 #include <algorithm> | 36 #include <algorithm> |
| 36 | 37 |
| 37 namespace blink { | 38 namespace blink { |
| 38 | 39 |
| 39 class ExceptionState; | 40 class ExceptionState; |
| 40 | 41 |
| 41 class CORE_EXPORT TimeRanges : public GarbageCollectedFinalized<TimeRanges>, pub
lic ScriptWrappable { | 42 class CORE_EXPORT TimeRanges : public GarbageCollectedFinalized<TimeRanges>, pub
lic ScriptWrappable { |
| 42 DEFINE_WRAPPERTYPEINFO(); | 43 DEFINE_WRAPPERTYPEINFO(); |
| 43 public: | 44 public: |
| 44 // We consider all the Ranges to be semi-bounded as follow: [start, end[ | 45 // We consider all the Ranges to be semi-bounded as follow: [start, end[ |
| 45 struct Range { | 46 struct Range { |
| 47 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 46 public: | 48 public: |
| 47 Range() { } | 49 Range() { } |
| 48 Range(double start, double end) | 50 Range(double start, double end) |
| 49 { | 51 { |
| 50 m_start = start; | 52 m_start = start; |
| 51 m_end = end; | 53 m_end = end; |
| 52 } | 54 } |
| 53 double m_start; | 55 double m_start; |
| 54 double m_end; | 56 double m_end; |
| 55 | 57 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 TimeRanges(double start, double end); | 118 TimeRanges(double start, double end); |
| 117 | 119 |
| 118 void invert(); | 120 void invert(); |
| 119 | 121 |
| 120 Vector<Range> m_ranges; | 122 Vector<Range> m_ranges; |
| 121 }; | 123 }; |
| 122 | 124 |
| 123 } // namespace blink | 125 } // namespace blink |
| 124 | 126 |
| 125 #endif // TimeRanges_h | 127 #endif // TimeRanges_h |
| OLD | NEW |