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

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

Issue 1618523003: Merge of "Add metrics regarding concurrent audible tabs in Chromium." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 11 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 10 matching lines...) Expand all
21 21
22 // This class manages all RenderFrame based media related managers at the 22 // This class manages all RenderFrame based media related managers at the
23 // browser side. It receives IPC messages from media RenderFrameObservers and 23 // browser side. It receives IPC messages from media RenderFrameObservers and
24 // forwards them to the corresponding managers. The managers are responsible 24 // forwards them to the corresponding managers. The managers are responsible
25 // for sending IPCs back to the RenderFrameObservers at the render side. 25 // for sending IPCs back to the RenderFrameObservers at the render side.
26 class CONTENT_EXPORT MediaWebContentsObserver : public WebContentsObserver { 26 class CONTENT_EXPORT MediaWebContentsObserver : public WebContentsObserver {
27 public: 27 public:
28 explicit MediaWebContentsObserver(WebContents* web_contents); 28 explicit MediaWebContentsObserver(WebContents* web_contents);
29 ~MediaWebContentsObserver() override; 29 ~MediaWebContentsObserver() override;
30 30
31 // Called when the audible state has changed. If inaudible any audio power 31 // Called by WebContentsImpl when the audible state may have changed.
32 // save blockers are released. 32 void MaybeUpdateAudibleState();
33 void MaybeUpdateAudibleState(bool recently_audible);
34 33
35 // WebContentsObserver implementation. 34 // WebContentsObserver implementation.
35 void WebContentsDestroyed() override;
36 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; 36 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
37 bool OnMessageReceived(const IPC::Message& message, 37 bool OnMessageReceived(const IPC::Message& message,
38 RenderFrameHost* render_frame_host) override; 38 RenderFrameHost* render_frame_host) override;
39 void WasShown() override; 39 void WasShown() override;
40 void WasHidden() override; 40 void WasHidden() override;
41 41
42 bool has_audio_power_save_blocker_for_testing() const { 42 bool has_audio_power_save_blocker_for_testing() const {
43 return audio_power_save_blocker_; 43 return audio_power_save_blocker_;
44 } 44 }
45 45
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 ActiveMediaPlayerMap active_video_players_; 87 ActiveMediaPlayerMap active_video_players_;
88 scoped_ptr<PowerSaveBlocker> audio_power_save_blocker_; 88 scoped_ptr<PowerSaveBlocker> audio_power_save_blocker_;
89 scoped_ptr<PowerSaveBlocker> video_power_save_blocker_; 89 scoped_ptr<PowerSaveBlocker> video_power_save_blocker_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver); 91 DISALLOW_COPY_AND_ASSIGN(MediaWebContentsObserver);
92 }; 92 };
93 93
94 } // namespace content 94 } // namespace content
95 95
96 #endif // CONTENT_BROWSER_MEDIA_MEDIA_WEB_CONTENTS_OBSERVER_H_ 96 #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