| Index: sky/engine/bindings-dart/core/dart/custom/DartTrackEventCustom.cpp
|
| diff --git a/LICENSE b/sky/engine/bindings-dart/core/dart/custom/DartTrackEventCustom.cpp
|
| similarity index 63%
|
| copy from LICENSE
|
| copy to sky/engine/bindings-dart/core/dart/custom/DartTrackEventCustom.cpp
|
| index 972bb2edb099e58b6a1939fa57f8e74391159c0c..da2c56b0630965afefcbd2e5ea64941eaab469d7 100644
|
| --- a/LICENSE
|
| +++ b/sky/engine/bindings-dart/core/dart/custom/DartTrackEventCustom.cpp
|
| @@ -1,4 +1,5 @@
|
| -// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Copyright 2011, Google Inc.
|
| +// All rights reserved.
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -25,3 +26,41 @@
|
| // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| +
|
| +#include "config.h"
|
| +
|
| +#include "bindings/core/dart/DartTrackEvent.h"
|
| +
|
| +#include "bindings/core/dart/DartTextTrack.h"
|
| +#include "core/html/track/TrackBase.h"
|
| +#include "core/html/track/TrackEvent.h"
|
| +
|
| +
|
| +namespace blink {
|
| +
|
| +namespace DartTrackEventInternal {
|
| +
|
| +void trackGetter(Dart_NativeArguments args)
|
| +{
|
| + TrackEvent* trackEvent = DartDOMWrapper::receiver<TrackEvent>(args);
|
| + TrackBase* track = trackEvent->track();
|
| +
|
| + if (!track)
|
| + return;
|
| +
|
| + switch (track->type()) {
|
| + case TrackBase::TextTrack:
|
| + DartTextTrack::returnToDart(args, static_cast<TextTrack*>(track));
|
| + return;
|
| + case TrackBase::AudioTrack:
|
| + case TrackBase::VideoTrack:
|
| + // This should not happen until VideoTrack and AudioTrack are implemented.
|
| + ASSERT_NOT_REACHED();
|
| + break;
|
| + }
|
| +
|
| +}
|
| +
|
| +}
|
| +
|
| +}
|
|
|