OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 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 23 matching lines...) Expand all Loading... |
34 #include "core/html/HTMLMediaElement.h" | 34 #include "core/html/HTMLMediaElement.h" |
35 #include "core/html/TimeRanges.h" | 35 #include "core/html/TimeRanges.h" |
36 #include "platform/Clock.h" | 36 #include "platform/Clock.h" |
37 #include "wtf/CurrentTime.h" | 37 #include "wtf/CurrentTime.h" |
38 #include "wtf/StdLibExtras.h" | 38 #include "wtf/StdLibExtras.h" |
39 #include "wtf/text/AtomicString.h" | 39 #include "wtf/text/AtomicString.h" |
40 | 40 |
41 using namespace WebCore; | 41 using namespace WebCore; |
42 using namespace std; | 42 using namespace std; |
43 | 43 |
44 PassRefPtr<MediaController> MediaController::create(ExecutionContext* context) | 44 PassRefPtrWillBeRawPtr<MediaController> MediaController::create(ExecutionContext
* context) |
45 { | 45 { |
46 return adoptRefWillBeRefCountedGarbageCollected(new MediaController(context)
); | 46 return adoptRefWillBeRefCountedGarbageCollected(new MediaController(context)
); |
47 } | 47 } |
48 | 48 |
49 MediaController::MediaController(ExecutionContext* context) | 49 MediaController::MediaController(ExecutionContext* context) |
50 : m_paused(false) | 50 : m_paused(false) |
51 , m_defaultPlaybackRate(1) | 51 , m_defaultPlaybackRate(1) |
52 , m_volume(1) | 52 , m_volume(1) |
53 , m_position(MediaPlayer::invalidTime()) | 53 , m_position(MediaPlayer::invalidTime()) |
54 , m_muted(false) | 54 , m_muted(false) |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 { | 598 { |
599 double now = WTF::currentTime(); | 599 double now = WTF::currentTime(); |
600 double timedelta = now - m_previousTimeupdateTime; | 600 double timedelta = now - m_previousTimeupdateTime; |
601 | 601 |
602 if (timedelta < maxTimeupdateEventFrequency) | 602 if (timedelta < maxTimeupdateEventFrequency) |
603 return; | 603 return; |
604 | 604 |
605 scheduleEvent(EventTypeNames::timeupdate); | 605 scheduleEvent(EventTypeNames::timeupdate); |
606 m_previousTimeupdateTime = now; | 606 m_previousTimeupdateTime = now; |
607 } | 607 } |
OLD | NEW |