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

Unified Diff: chromecast/browser/cast_media_blocker.h

Issue 2450433002: Let CastMediaBlocker observe MediaSession instead of WebContents (Closed)
Patch Set: fixed tests Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/browser/cast_media_blocker.cc » ('j') | chromecast/browser/cast_media_blocker.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_media_blocker.h
diff --git a/chromecast/browser/cast_media_blocker.h b/chromecast/browser/cast_media_blocker.h
index b3350603f7b1fb448130768b7a7eb26cca37b899..727c50344d294d9a605254cacbd4808209090c70 100644
--- a/chromecast/browser/cast_media_blocker.h
+++ b/chromecast/browser/cast_media_blocker.h
@@ -5,26 +5,23 @@
#ifndef CHROMECAST_BROWSER_CAST_MEDIA_BLOCKER_H_
#define CHROMECAST_BROWSER_CAST_MEDIA_BLOCKER_H_
-#include "base/macros.h"
+#include "base/callback.h"
derekjchow1 2016/10/24 18:50:33 callback & callback_forward seems redundant.
Zhiqiang Zhang (Slow) 2016/10/28 10:36:52 They are all removed since we don't use callback a
#include "base/callback_forward.h"
-#include "content/public/browser/web_contents_observer.h"
-
-namespace content {
-class WebContents;
-} // namespace content
+#include "base/macros.h"
+#include "content/public/browser/media_session_observer.h"
namespace chromecast {
namespace shell {
// This class implements a blocking mode for web applications and is used in
// Chromecast internal code. Media is unblocked by default.
-class CastMediaBlocker : public content::WebContentsObserver {
+class CastMediaBlocker : public content::MediaSessionObserver {
derekjchow1 2016/10/24 18:50:33 We actually inherit from this class internally, an
public:
- explicit CastMediaBlocker(content::WebContents* web_contents);
+ explicit CastMediaBlocker(content::MediaSession* media_session);
// Constructor for test. |suspend_cb| and |resume_cb| will be called when
// Suspend() and Resume() are called.
- CastMediaBlocker(content::WebContents* web_contents,
+ CastMediaBlocker(content::MediaSession* media_session,
const base::Closure& suspend_cb,
const base::Closure& resume_cb);
« no previous file with comments | « no previous file | chromecast/browser/cast_media_blocker.cc » ('j') | chromecast/browser/cast_media_blocker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698