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

Side by Side Diff: content/browser/media/media_web_contents_observer.h

Issue 972973002: Revert of Propagate audible state from player to the containing tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
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 "base/memory/scoped_ptr.h"
11 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
12 #include "content/public/browser/web_contents_observer.h" 11 #include "content/public/browser/web_contents_observer.h"
13 12
14 namespace content { 13 namespace content {
15 14
16 #if defined(OS_ANDROID)
17 class MediaPlayersObserver;
18 #endif // defined(OS_ANDROID)
19
20 class BrowserCdmManager; 15 class BrowserCdmManager;
21 class BrowserMediaPlayerManager; 16 class BrowserMediaPlayerManager;
22 17
23 // This class manages all RenderFrame based media related managers at the 18 // This class manages all RenderFrame based media related managers at the
24 // browser side. It receives IPC messages from media RenderFrameObservers and 19 // browser side. It receives IPC messages from media RenderFrameObservers and
25 // forwards them to the corresponding managers. The managers are responsible 20 // forwards them to the corresponding managers. The managers are responsible
26 // for sending IPCs back to the RenderFrameObservers at the render side. 21 // for sending IPCs back to the RenderFrameObservers at the render side.
27 class CONTENT_EXPORT MediaWebContentsObserver : public WebContentsObserver { 22 class CONTENT_EXPORT MediaWebContentsObserver : public WebContentsObserver {
28 public: 23 public:
29 explicit MediaWebContentsObserver(WebContents* web_contents); 24 explicit MediaWebContentsObserver(WebContents* web_contents);
(...skipping 13 matching lines...) Expand all
43 bool OnMediaPlayerSetCdmMessageReceived(const IPC::Message& message, 38 bool OnMediaPlayerSetCdmMessageReceived(const IPC::Message& message,
44 RenderFrameHost* render_frame_host); 39 RenderFrameHost* render_frame_host);
45 40
46 // Gets the media player manager associated with |render_frame_host|. Creates 41 // Gets the media player manager associated with |render_frame_host|. Creates
47 // a new one if it doesn't exist. The caller doesn't own the returned pointer. 42 // a new one if it doesn't exist. The caller doesn't own the returned pointer.
48 BrowserMediaPlayerManager* GetMediaPlayerManager( 43 BrowserMediaPlayerManager* GetMediaPlayerManager(
49 RenderFrameHost* render_frame_host); 44 RenderFrameHost* render_frame_host);
50 45
51 void OnSetCdm(RenderFrameHost* render_frame_host, int player_id, int cdm_id); 46 void OnSetCdm(RenderFrameHost* render_frame_host, int player_id, int cdm_id);
52 47
53 MediaPlayersObserver* GetMediaPlayersObserver() const;
54
55 #if defined(VIDEO_HOLE) 48 #if defined(VIDEO_HOLE)
56 void OnFrameInfoUpdated(); 49 void OnFrameInfoUpdated();
57 #endif // defined(VIDEO_HOLE) 50 #endif // defined(VIDEO_HOLE)
58 51
59 private: 52 private:
60 // Map from RenderFrameHost* to BrowserMediaPlayerManager. 53 // Map from RenderFrameHost* to BrowserMediaPlayerManager.
61 typedef base::ScopedPtrHashMap<uintptr_t, BrowserMediaPlayerManager> 54 typedef base::ScopedPtrHashMap<uintptr_t, BrowserMediaPlayerManager>
62 MediaPlayerManagerMap; 55 MediaPlayerManagerMap;
63 MediaPlayerManagerMap media_player_managers_; 56 MediaPlayerManagerMap media_player_managers_;
64 #endif // defined(OS_ANDROID) 57 #endif // defined(OS_ANDROID)
65 58
66 private: 59 private:
67 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver); 60 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver);
68 }; 61 };
69 62
70 } // namespace content 63 } // namespace content
71 64
72 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ 65 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/browser/media/audio_stream_monitor_unittest.cc ('k') | content/browser/media/media_web_contents_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698