Chromium Code Reviews| 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..2866afaf97b631264fe79b9b80a20dbb650cf32f |
| --- /dev/null |
| +++ b/content/browser/media/android/browser_media_session_manager.cc |
| @@ -0,0 +1,37 @@ |
| +// 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 activation_id) { |
|
mlamouri (slow - plz ping)
2015/12/02 15:53:30
nit: ditto
davve
2015/12/04 12:43:08
Done.
|
| + NOTIMPLEMENTED(); |
| + Send(new MediaSessionMsg_DidActivate(GetRoutingID(), session_id, |
| + activation_id, false)); |
| +} |
| + |
| +void BrowserMediaSessionManager::OnDeactivate(int session_id, |
| + int deactivation_id) { |
|
mlamouri (slow - plz ping)
2015/12/02 15:53:30
nit: ditto
davve
2015/12/04 12:43:08
Done.
|
| + NOTIMPLEMENTED(); |
| + Send(new MediaSessionMsg_DidDeactivate(GetRoutingID(), session_id, |
| + deactivation_id)); |
| +} |
| + |
| +int BrowserMediaSessionManager::GetRoutingID() const { |
| + return render_frame_host_->GetRoutingID(); |
| +} |
| + |
| +bool BrowserMediaSessionManager::Send(IPC::Message* msg) { |
| + return render_frame_host_->Send(msg); |
| +} |
| + |
| +} // namespace content |