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

Unified Diff: content/browser/android/browser_demuxer_android.h

Issue 23494040: Split media::DemuxerAndroid implementation of BrowserMediaPlayerManager to BrowserDemuxerAndroid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 3 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 | « content/browser/android/OWNERS ('k') | content/browser/android/browser_demuxer_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/browser_demuxer_android.h
diff --git a/content/browser/android/browser_demuxer_android.h b/content/browser/android/browser_demuxer_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..816d8b7220832c938ed81e8c92568c0d7884eb7e
--- /dev/null
+++ b/content/browser/android/browser_demuxer_android.h
@@ -0,0 +1,53 @@
+// Copyright 2013 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.
+
+#ifndef CONTENT_BROWSER_ANDROID_BROWSER_DEMUXER_ANDROID_H_
+#define CONTENT_BROWSER_ANDROID_BROWSER_DEMUXER_ANDROID_H_
+
+#include "base/id_map.h"
+#include "content/public/browser/render_view_host_observer.h"
+#include "media/base/android/demuxer_android.h"
+
+namespace content {
+
+// Represents the browser process half of an IPC-based implementation of
+// media::DemuxerAndroid.
+class CONTENT_EXPORT BrowserDemuxerAndroid
+ : public RenderViewHostObserver,
+ public media::DemuxerAndroid {
+ public:
+ explicit BrowserDemuxerAndroid(RenderViewHost* rvh);
+ virtual ~BrowserDemuxerAndroid();
+
+ // RenderViewHostObserver overrides.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ // media::DemuxerAndroid implementation.
+ virtual void AddDemuxerClient(int demuxer_client_id,
+ media::DemuxerAndroidClient* client) OVERRIDE;
+ virtual void RemoveDemuxerClient(int demuxer_client_id) OVERRIDE;
+ virtual void RequestDemuxerConfigs(int demuxer_client_id) OVERRIDE;
+ virtual void RequestDemuxerData(int demuxer_client_id,
+ media::DemuxerStream::Type type) OVERRIDE;
+ virtual void RequestDemuxerSeek(int demuxer_client_id,
+ base::TimeDelta time_to_seek,
+ unsigned seek_request_id) OVERRIDE;
+
+ private:
+ void OnDemuxerReady(int demuxer_client_id,
+ const media::DemuxerConfigs& configs);
+ void OnReadFromDemuxerAck(int demuxer_client_id,
+ const media::DemuxerData& data);
+ void OnMediaSeekRequestAck(int demuxer_client_id, unsigned seek_request_id);
+ void OnDurationChanged(int demuxer_client_id,
+ const base::TimeDelta& duration);
+
+ IDMap<media::DemuxerAndroidClient> demuxer_clients_;
+
+ DISALLOW_COPY_AND_ASSIGN(BrowserDemuxerAndroid);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_ANDROID_BROWSER_DEMUXER_ANDROID_H_
« no previous file with comments | « content/browser/android/OWNERS ('k') | content/browser/android/browser_demuxer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698