Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: content/renderer/media/webmediaplayer_proxy_impl_android.h

Issue 17502007: Move webkit/renderer/media/android/ to content/renderer/media/android/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PROXY_IMPL_ANDROID_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PROXY_IMPL_ANDROID_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PROXY_IMPL_ANDROID_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PROXY_IMPL_ANDROID_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "content/public/renderer/render_view_observer.h" 10 #include "content/public/renderer/render_view_observer.h"
11 #include "content/renderer/media/android/webmediaplayer_proxy_android.h"
11 #include "media/base/media_keys.h" 12 #include "media/base/media_keys.h"
12 #include "webkit/renderer/media/android/webmediaplayer_proxy_android.h"
13 13
14 namespace webkit_media { 14 namespace content {
15
15 class WebMediaPlayerAndroid; 16 class WebMediaPlayerAndroid;
16 class WebMediaPlayerManagerAndroid; 17 class WebMediaPlayerManagerAndroid;
17 }
18
19 namespace content {
20 18
21 // This class manages all the IPC communications between 19 // This class manages all the IPC communications between
22 // WebMediaPlayerAndroid and the MediaPlayerManagerAndroid in the browser 20 // WebMediaPlayerAndroid and the MediaPlayerManagerAndroid in the browser
23 // process. 21 // process.
24 class WebMediaPlayerProxyImplAndroid 22 class WebMediaPlayerProxyImplAndroid
qinmin 2013/06/21 04:37:05 same here, rename to WebMediaPlayerProxyAndroid, a
scherkus (not reviewing) 2013/06/21 21:37:59 Done.
25 : public RenderViewObserver, 23 : public RenderViewObserver,
26 public webkit_media::WebMediaPlayerProxyAndroid { 24 public WebMediaPlayerProxyAndroid {
27 public: 25 public:
28 // Construct a WebMediaPlayerProxyImplAndroid object for the |render_view|. 26 // Construct a WebMediaPlayerProxyImplAndroid object for the |render_view|.
29 // |manager| is passed to this class so that it can find the right 27 // |manager| is passed to this class so that it can find the right
30 // WebMediaPlayerAndroid using player IDs. 28 // WebMediaPlayerAndroid using player IDs.
31 WebMediaPlayerProxyImplAndroid( 29 WebMediaPlayerProxyImplAndroid(
32 RenderView* render_view, 30 RenderView* render_view,
33 webkit_media::WebMediaPlayerManagerAndroid* manager); 31 WebMediaPlayerManagerAndroid* manager);
34 virtual ~WebMediaPlayerProxyImplAndroid(); 32 virtual ~WebMediaPlayerProxyImplAndroid();
35 33
36 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 34 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
37 35
38 // Methods inherited from WebMediaPlayerProxyAndroid. 36 // Methods inherited from WebMediaPlayerProxyAndroid.
39 virtual void Initialize( 37 virtual void Initialize(
40 int player_id, 38 int player_id,
41 const GURL& url, 39 const GURL& url,
42 media::MediaPlayerAndroid::SourceType source_type, 40 media::MediaPlayerAndroid::SourceType source_type,
43 const GURL& first_party_for_cookies) OVERRIDE; 41 const GURL& first_party_for_cookies) OVERRIDE;
(...skipping 24 matching lines...) Expand all
68 66
69 #if defined(GOOGLE_TV) 67 #if defined(GOOGLE_TV)
70 virtual void RequestExternalSurface( 68 virtual void RequestExternalSurface(
71 int player_id, const gfx::RectF& geometry) OVERRIDE; 69 int player_id, const gfx::RectF& geometry) OVERRIDE;
72 70
73 // Methods inherited from RenderViewObserver. 71 // Methods inherited from RenderViewObserver.
74 virtual void DidCommitCompositorFrame() OVERRIDE; 72 virtual void DidCommitCompositorFrame() OVERRIDE;
75 #endif 73 #endif
76 74
77 private: 75 private:
78 webkit_media::WebMediaPlayerAndroid* GetWebMediaPlayer(int player_id); 76 WebMediaPlayerAndroid* GetWebMediaPlayer(int player_id);
79 77
80 // Message handlers. 78 // Message handlers.
81 void OnMediaMetadataChanged(int player_id, base::TimeDelta duration, 79 void OnMediaMetadataChanged(int player_id, base::TimeDelta duration,
82 int width, int height, bool success); 80 int width, int height, bool success);
83 void OnMediaPlaybackCompleted(int player_id); 81 void OnMediaPlaybackCompleted(int player_id);
84 void OnMediaBufferingUpdate(int player_id, int percent); 82 void OnMediaBufferingUpdate(int player_id, int percent);
85 void OnMediaSeekCompleted(int player_id, base::TimeDelta current_time); 83 void OnMediaSeekCompleted(int player_id, base::TimeDelta current_time);
86 void OnMediaError(int player_id, int error); 84 void OnMediaError(int player_id, int error);
87 void OnVideoSizeChanged(int player_id, int width, int height); 85 void OnVideoSizeChanged(int player_id, int width, int height);
88 void OnTimeUpdate(int player_id, base::TimeDelta current_time); 86 void OnTimeUpdate(int player_id, base::TimeDelta current_time);
(...skipping 11 matching lines...) Expand all
100 const std::string& session_id); 98 const std::string& session_id);
101 void OnKeyError(int player_id, 99 void OnKeyError(int player_id,
102 const std::string& session_id, 100 const std::string& session_id,
103 media::MediaKeys::KeyError error_code, 101 media::MediaKeys::KeyError error_code,
104 int system_code); 102 int system_code);
105 void OnKeyMessage(int player_id, 103 void OnKeyMessage(int player_id,
106 const std::string& session_id, 104 const std::string& session_id,
107 const std::string& message, 105 const std::string& message,
108 const std::string& destination_url); 106 const std::string& destination_url);
109 107
110 webkit_media::WebMediaPlayerManagerAndroid* manager_; 108 WebMediaPlayerManagerAndroid* manager_;
111 109
112 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerProxyImplAndroid); 110 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerProxyImplAndroid);
113 }; 111 };
114 112
115 } // namespace content 113 } // namespace content
116 114
117 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PROXY_IMPL_ANDROID_H_ 115 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_PROXY_IMPL_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698