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

Unified Diff: content/browser/media/android/browser_media_session_manager.cc

Issue 1441883003: Hook up RendererMediaSessionManager with browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add documentation, style fix and scoped_ptr Created 5 years 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
Index: content/browser/media/android/browser_media_session_manager.cc
diff --git a/content/browser/media/android/browser_media_session_manager.cc b/content/browser/media/android/browser_media_session_manager.cc
new file mode 100644
index 0000000000000000000000000000000000000000..146a60fe970ae9da7f0fe9a4b56f044ecdfeec77
--- /dev/null
+++ b/content/browser/media/android/browser_media_session_manager.cc
@@ -0,0 +1,34 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/media/android/browser_media_session_manager.h"
+
+#include "content/common/media/media_session_messages_android.h"
+#include "content/public/browser/render_frame_host.h"
+
+namespace content {
+
+BrowserMediaSessionManager::BrowserMediaSessionManager(
+ RenderFrameHost* render_frame_host)
+ : render_frame_host_(render_frame_host) {}
+
+void BrowserMediaSessionManager::OnActivate(int session_id, int request_id) {
+ NOTIMPLEMENTED();
Mike West 2015/12/09 17:39:59 What are these eventually going to do? It's diffic
davve 2015/12/10 08:28:38 I can't blame you. :) (To some extent considering
+ Send(new MediaSessionMsg_DidActivate(GetRoutingID(), request_id, false));
+}
+
+void BrowserMediaSessionManager::OnDeactivate(int session_id, int request_id) {
+ NOTIMPLEMENTED();
+ Send(new MediaSessionMsg_DidDeactivate(GetRoutingID(), request_id));
+}
+
+int BrowserMediaSessionManager::GetRoutingID() const {
+ return render_frame_host_->GetRoutingID();
+}
+
+bool BrowserMediaSessionManager::Send(IPC::Message* msg) {
+ return render_frame_host_->Send(msg);
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698