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 WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_ | 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_ |
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_ | 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 | 11 |
12 namespace WebKit { | 12 namespace WebKit { |
13 class WebFrame; | 13 class WebFrame; |
14 } | 14 } |
15 | 15 |
| 16 namespace gfx { |
| 17 class RectF; |
| 18 } |
| 19 |
16 namespace webkit_media { | 20 namespace webkit_media { |
17 | 21 |
18 class WebMediaPlayerAndroid; | 22 class WebMediaPlayerAndroid; |
19 | 23 |
20 // Class for managing all the WebMediaPlayerAndroid objects in the same | 24 // Class for managing all the WebMediaPlayerAndroid objects in the same |
21 // RenderView. | 25 // RenderView. |
22 class WebMediaPlayerManagerAndroid { | 26 class WebMediaPlayerManagerAndroid { |
23 public: | 27 public: |
24 WebMediaPlayerManagerAndroid(); | 28 WebMediaPlayerManagerAndroid(); |
25 virtual ~WebMediaPlayerManagerAndroid(); | 29 virtual ~WebMediaPlayerManagerAndroid(); |
(...skipping 12 matching lines...) Expand all Loading... |
38 // Called when a player entered or exited fullscreen. | 42 // Called when a player entered or exited fullscreen. |
39 void DidEnterFullscreen(WebKit::WebFrame* frame); | 43 void DidEnterFullscreen(WebKit::WebFrame* frame); |
40 void DidExitFullscreen(); | 44 void DidExitFullscreen(); |
41 | 45 |
42 // Check whether the Webframe is in fullscreen. | 46 // Check whether the Webframe is in fullscreen. |
43 bool IsInFullscreen(WebKit::WebFrame* frame); | 47 bool IsInFullscreen(WebKit::WebFrame* frame); |
44 | 48 |
45 // Get the pointer to WebMediaPlayerAndroid given the |player_id|. | 49 // Get the pointer to WebMediaPlayerAndroid given the |player_id|. |
46 WebMediaPlayerAndroid* GetMediaPlayer(int player_id); | 50 WebMediaPlayerAndroid* GetMediaPlayer(int player_id); |
47 | 51 |
| 52 #if defined(GOOGLE_TV) |
| 53 // Get the list of media players with video geometry changes. |
| 54 void RetrieveGeometryChanges(std::map<int, gfx::RectF>* changes); |
| 55 #endif |
| 56 |
48 private: | 57 private: |
49 // Info for all available WebMediaPlayerAndroid on a page; kept so that | 58 // Info for all available WebMediaPlayerAndroid on a page; kept so that |
50 // we can enumerate them to send updates about tab focus and visibily. | 59 // we can enumerate them to send updates about tab focus and visibily. |
51 std::map<int32, WebMediaPlayerAndroid*> media_players_; | 60 std::map<int, WebMediaPlayerAndroid*> media_players_; |
52 | 61 |
53 int32 next_media_player_id_; | 62 int next_media_player_id_; |
54 | 63 |
55 // WebFrame of the fullscreen video. | 64 // WebFrame of the fullscreen video. |
56 WebKit::WebFrame* fullscreen_frame_; | 65 WebKit::WebFrame* fullscreen_frame_; |
57 | 66 |
58 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerManagerAndroid); | 67 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerManagerAndroid); |
59 }; | 68 }; |
60 | 69 |
61 } // namespace webkit_media | 70 } // namespace webkit_media |
62 | 71 |
63 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_ | 72 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_MANAGER_ANDROID_H_ |
OLD | NEW |