blob: 1a17346e0180e9840493096b191f140e7960e2ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
// Copyright (c) 2008 The Chromium Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
#include "config.h"
#include "FrameView.h"
#include "MediaPlayerPrivateChromium.h"
#include "PlatformString.h"
#include "ResourceRequest.h"
#include "ResourceHandle.h"
#undef LOG
#include "googleurl/src/gurl.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/weberror_impl.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webmediaplayer_delegate.h"
#include "webkit/glue/webmediaplayer_impl.h"
#include "webkit/glue/webresponse_impl.h"
#include "webkit/glue/weburlrequest_impl.h"
#if ENABLE(VIDEO)
namespace webkit_glue {
WebMediaPlayerImpl::WebMediaPlayerImpl(
WebCore::MediaPlayerPrivate* media_player_private)
: media_player_private_(media_player_private) {
}
WebMediaPlayerImpl::~WebMediaPlayerImpl() {
}
void WebMediaPlayerImpl::Initialize(WebMediaPlayerDelegate* delegate){
delegate_ = delegate;
}
WebFrame* WebMediaPlayerImpl::GetWebFrame() {
if (media_player_private_ && media_player_private_->frameView()->frame()) {
return WebFrameImpl::FromFrame(
media_player_private_->frameView()->frame());
} else {
return NULL;
}
}
void WebMediaPlayerImpl::NotifyNetworkStateChange() {
if (media_player_private_)
media_player_private_->networkStateChanged();
}
void WebMediaPlayerImpl::NotifyReadyStateChange() {
if (media_player_private_)
media_player_private_->readyStateChanged();
}
void WebMediaPlayerImpl::NotifyTimeChange() {
if (media_player_private_)
media_player_private_->timeChanged();
}
void WebMediaPlayerImpl::NotifyVolumeChange() {
if (media_player_private_)
media_player_private_->volumeChanged();
}
void WebMediaPlayerImpl::NotifySizeChanged() {
if (media_player_private_)
media_player_private_->sizeChanged();
}
void WebMediaPlayerImpl::NotifyRateChanged() {
if (media_player_private_)
media_player_private_->rateChanged();
}
void WebMediaPlayerImpl::NotifyDurationChanged() {
if (media_player_private_)
media_player_private_->durationChanged();
}
void WebMediaPlayerImpl::Repaint() {
if (media_player_private_)
media_player_private_->repaint();
}
} // namespace webkit_glue
#endif // ENABLE(VIDEO)
|