OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ |
6 #define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ | 6 #define CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/containers/scoped_ptr_hash_map.h" | 9 #include "base/containers/scoped_ptr_hash_map.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 bool OnMediaPlayerSetCdmMessageReceived(const IPC::Message& message, | 39 bool OnMediaPlayerSetCdmMessageReceived(const IPC::Message& message, |
40 RenderFrameHost* render_frame_host); | 40 RenderFrameHost* render_frame_host); |
41 | 41 |
42 // Gets the media player manager associated with |render_frame_host|. Creates | 42 // Gets the media player manager associated with |render_frame_host|. Creates |
43 // a new one if it doesn't exist. The caller doesn't own the returned pointer. | 43 // a new one if it doesn't exist. The caller doesn't own the returned pointer. |
44 BrowserMediaPlayerManager* GetMediaPlayerManager( | 44 BrowserMediaPlayerManager* GetMediaPlayerManager( |
45 RenderFrameHost* render_frame_host); | 45 RenderFrameHost* render_frame_host); |
46 | 46 |
47 void OnSetCdm(RenderFrameHost* render_frame_host, int player_id, int cdm_id); | 47 void OnSetCdm(RenderFrameHost* render_frame_host, int player_id, int cdm_id); |
48 | 48 |
49 // Pauses all media player. | |
50 void PauseVideo(); | |
51 | |
52 #if defined(VIDEO_HOLE) | 49 #if defined(VIDEO_HOLE) |
53 void OnFrameInfoUpdated(); | 50 void OnFrameInfoUpdated(); |
54 #endif // defined(VIDEO_HOLE) | 51 #endif // defined(VIDEO_HOLE) |
55 | 52 |
56 private: | 53 private: |
57 // Map from RenderFrameHost* to BrowserMediaPlayerManager. | 54 // Map from RenderFrameHost* to BrowserMediaPlayerManager. |
58 typedef base::ScopedPtrHashMap<uintptr_t, BrowserMediaPlayerManager> | 55 typedef base::ScopedPtrHashMap<uintptr_t, BrowserMediaPlayerManager> |
59 MediaPlayerManagerMap; | 56 MediaPlayerManagerMap; |
60 MediaPlayerManagerMap media_player_managers_; | 57 MediaPlayerManagerMap media_player_managers_; |
61 #endif // defined(OS_ANDROID) | 58 #endif // defined(OS_ANDROID) |
62 | 59 |
63 private: | 60 private: |
64 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver); | 61 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver); |
65 }; | 62 }; |
66 | 63 |
67 } // namespace content | 64 } // namespace content |
68 | 65 |
69 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ | 66 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |