OLD | NEW |
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_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_ANDROID_H_ |
6 #define CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_ANDROID_H_ | 6 #define CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_ANDROID_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "base/time.h" | 13 #include "base/time.h" |
14 #include "content/browser/android/content_video_view.h" | 14 #include "content/browser/android/content_video_view.h" |
15 #include "content/public/browser/render_view_host_observer.h" | 15 #include "content/public/browser/render_view_host_observer.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
17 #include "media/base/android/media_player_bridge.h" | 17 #include "media/base/android/media_player_bridge.h" |
18 #include "media/base/android/media_player_bridge_manager.h" | 18 #include "media/base/android/media_player_bridge_manager.h" |
| 19 #include "ui/gfx/rect_f.h" |
19 | 20 |
20 namespace content { | 21 namespace content { |
21 | 22 |
22 class WebContents; | 23 class WebContents; |
23 | 24 |
24 // This class manages all the MediaPlayerBridge objects. It receives | 25 // This class manages all the MediaPlayerBridge objects. It receives |
25 // control operations from the the render process, and forwards | 26 // control operations from the the render process, and forwards |
26 // them to corresponding MediaPlayerBridge object. Callbacks from | 27 // them to corresponding MediaPlayerBridge object. Callbacks from |
27 // MediaPlayerBridge objects are converted to IPCs and then sent to the | 28 // MediaPlayerBridge objects are converted to IPCs and then sent to the |
28 // render process. | 29 // render process. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void OnEnterFullscreen(int player_id); | 77 void OnEnterFullscreen(int player_id); |
77 void OnExitFullscreen(int player_id); | 78 void OnExitFullscreen(int player_id); |
78 void OnInitialize(int player_id, const GURL& url, | 79 void OnInitialize(int player_id, const GURL& url, |
79 const GURL& first_party_for_cookies); | 80 const GURL& first_party_for_cookies); |
80 void OnStart(int player_id); | 81 void OnStart(int player_id); |
81 void OnSeek(int player_id, base::TimeDelta time); | 82 void OnSeek(int player_id, base::TimeDelta time); |
82 void OnPause(int player_id); | 83 void OnPause(int player_id); |
83 void OnReleaseResources(int player_id); | 84 void OnReleaseResources(int player_id); |
84 void OnDestroyPlayer(int player_id); | 85 void OnDestroyPlayer(int player_id); |
85 void OnRequestExternalSurface(int player_id); | 86 void OnRequestExternalSurface(int player_id); |
| 87 void OnNotifyGeometryChange(int player_id, const gfx::RectF& rect); |
86 | 88 |
87 // An array of managed players. | 89 // An array of managed players. |
88 ScopedVector<media::MediaPlayerBridge> players_; | 90 ScopedVector<media::MediaPlayerBridge> players_; |
89 | 91 |
90 // The fullscreen video view object. | 92 // The fullscreen video view object. |
91 ContentVideoView video_view_; | 93 ContentVideoView video_view_; |
92 | 94 |
93 // Player ID of the fullscreen media player. | 95 // Player ID of the fullscreen media player. |
94 int fullscreen_player_id_; | 96 int fullscreen_player_id_; |
95 | 97 |
96 WebContents* web_contents_; | 98 WebContents* web_contents_; |
97 | 99 |
98 DISALLOW_COPY_AND_ASSIGN(MediaPlayerManagerAndroid); | 100 DISALLOW_COPY_AND_ASSIGN(MediaPlayerManagerAndroid); |
99 }; | 101 }; |
100 | 102 |
101 } // namespace content | 103 } // namespace content |
102 | 104 |
103 #endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_ANDROID_H_ | 105 #endif // CONTENT_BROWSER_ANDROID_MEDIA_PLAYER_MANAGER_ANDROID_H_ |
OLD | NEW |