| 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 13 matching lines...) Expand all Loading... |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #include "config.h" | 26 #include "config.h" |
| 27 | 27 |
| 28 #include "core/html/MediaController.h" | 28 #include "core/html/MediaController.h" |
| 29 | 29 |
| 30 #include "core/dom/ExceptionCode.h" | 30 #include "core/dom/ExceptionCode.h" |
| 31 #include "core/html/HTMLMediaElement.h" | 31 #include "core/html/HTMLMediaElement.h" |
| 32 #include "core/html/TimeRanges.h" | 32 #include "core/html/TimeRanges.h" |
| 33 #include "core/platform/Clock.h" | 33 #include "core/platform/Clock.h" |
| 34 #include <wtf/CurrentTime.h> | 34 #include "wtf/CurrentTime.h" |
| 35 #include <wtf/StdLibExtras.h> | 35 #include "wtf/StdLibExtras.h" |
| 36 #include <wtf/text/AtomicString.h> | 36 #include "wtf/text/AtomicString.h" |
| 37 | 37 |
| 38 using namespace WebCore; | 38 using namespace WebCore; |
| 39 using namespace std; | 39 using namespace std; |
| 40 | 40 |
| 41 PassRefPtr<MediaController> MediaController::create(ScriptExecutionContext* cont
ext) | 41 PassRefPtr<MediaController> MediaController::create(ScriptExecutionContext* cont
ext) |
| 42 { | 42 { |
| 43 return adoptRef(new MediaController(context)); | 43 return adoptRef(new MediaController(context)); |
| 44 } | 44 } |
| 45 | 45 |
| 46 MediaController::MediaController(ScriptExecutionContext* context) | 46 MediaController::MediaController(ScriptExecutionContext* context) |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 { | 652 { |
| 653 double now = WTF::currentTime(); | 653 double now = WTF::currentTime(); |
| 654 double timedelta = now - m_previousTimeupdateTime; | 654 double timedelta = now - m_previousTimeupdateTime; |
| 655 | 655 |
| 656 if (timedelta < maxTimeupdateEventFrequency) | 656 if (timedelta < maxTimeupdateEventFrequency) |
| 657 return; | 657 return; |
| 658 | 658 |
| 659 scheduleEvent(eventNames().timeupdateEvent); | 659 scheduleEvent(eventNames().timeupdateEvent); |
| 660 m_previousTimeupdateTime = now; | 660 m_previousTimeupdateTime = now; |
| 661 } | 661 } |
| OLD | NEW |