| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "content/common/media/cdm_messages_enums.h" | 14 #include "content/common/media/cdm_messages_enums.h" |
| 15 #include "content/common/media/media_player_messages_enums_android.h" | 15 #include "content/common/media/media_player_messages_enums_android.h" |
| 16 #include "content/public/renderer/render_view_observer.h" | 16 #include "content/public/renderer/render_frame_observer.h" |
| 17 #include "media/base/android/media_player_android.h" | 17 #include "media/base/android/media_player_android.h" |
| 18 #include "media/base/media_keys.h" | 18 #include "media/base/media_keys.h" |
| 19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 20 | 20 |
| 21 namespace blink { | 21 namespace blink { |
| 22 class WebFrame; | 22 class WebFrame; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace gfx { | 25 namespace gfx { |
| 26 class RectF; | 26 class RectF; |
| 27 } | 27 } |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| 30 | 30 |
| 31 class ProxyMediaKeys; | 31 class ProxyMediaKeys; |
| 32 class WebMediaPlayerAndroid; | 32 class WebMediaPlayerAndroid; |
| 33 | 33 |
| 34 // Class for managing all the WebMediaPlayerAndroid objects in the same | 34 // Class for managing all the WebMediaPlayerAndroid objects in the same |
| 35 // RenderView. | 35 // RenderView. |
| 36 class RendererMediaPlayerManager : public RenderViewObserver { | 36 class RendererMediaPlayerManager : public RenderFrameObserver { |
| 37 public: | 37 public: |
| 38 static const int kInvalidCdmId = 0; | 38 static const int kInvalidCdmId = 0; |
| 39 | 39 |
| 40 // Constructs a RendererMediaPlayerManager object for the |render_view|. | 40 // Constructs a RendererMediaPlayerManager object for the |render_frame|. |
| 41 RendererMediaPlayerManager(RenderView* render_view); | 41 RendererMediaPlayerManager(RenderFrame* render_frame); |
| 42 virtual ~RendererMediaPlayerManager(); | 42 virtual ~RendererMediaPlayerManager(); |
| 43 | 43 |
| 44 // RenderViewObserver overrides. | 44 // RenderViewObserver overrides. |
| 45 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 45 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 46 | 46 |
| 47 // Initializes a MediaPlayerAndroid object in browser process. | 47 // Initializes a MediaPlayerAndroid object in browser process. |
| 48 void Initialize(MediaPlayerHostMsg_Initialize_Type type, | 48 void Initialize(MediaPlayerHostMsg_Initialize_Type type, |
| 49 int player_id, | 49 int player_id, |
| 50 const GURL& url, | 50 const GURL& url, |
| 51 const GURL& first_party_for_cookies, | 51 const GURL& first_party_for_cookies, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 | 204 |
| 205 // WebFrame of pending fullscreen request. | 205 // WebFrame of pending fullscreen request. |
| 206 blink::WebFrame* pending_fullscreen_frame_; | 206 blink::WebFrame* pending_fullscreen_frame_; |
| 207 | 207 |
| 208 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); | 208 DISALLOW_COPY_AND_ASSIGN(RendererMediaPlayerManager); |
| 209 }; | 209 }; |
| 210 | 210 |
| 211 } // namespace content | 211 } // namespace content |
| 212 | 212 |
| 213 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ | 213 #endif // CONTENT_RENDERER_MEDIA_ANDROID_RENDERER_MEDIA_PLAYER_MANAGER_H_ |
| OLD | NEW |