OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/browser/media/android/browser_demuxer_android.h" | 5 #include "content/browser/media/android/browser_demuxer_android.h" |
6 | 6 |
7 #include "content/common/media/media_player_messages_android.h" | 7 #include "content/common/media/media_player_messages_android.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 switch (message.type()) { | 63 switch (message.type()) { |
64 case MediaPlayerHostMsg_DemuxerReady::ID: | 64 case MediaPlayerHostMsg_DemuxerReady::ID: |
65 case MediaPlayerHostMsg_ReadFromDemuxerAck::ID: | 65 case MediaPlayerHostMsg_ReadFromDemuxerAck::ID: |
66 case MediaPlayerHostMsg_DurationChanged::ID: | 66 case MediaPlayerHostMsg_DurationChanged::ID: |
67 case MediaPlayerHostMsg_DemuxerSeekDone::ID: | 67 case MediaPlayerHostMsg_DemuxerSeekDone::ID: |
68 *thread = BrowserThread::UI; | 68 *thread = BrowserThread::UI; |
69 return; | 69 return; |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 bool BrowserDemuxerAndroid::OnMessageReceived(const IPC::Message& message, | 73 bool BrowserDemuxerAndroid::OnMessageReceived(const IPC::Message& message) { |
74 bool* message_was_ok) { | |
75 bool handled = true; | 74 bool handled = true; |
76 IPC_BEGIN_MESSAGE_MAP_EX(BrowserDemuxerAndroid, message, *message_was_ok) | 75 IPC_BEGIN_MESSAGE_MAP(BrowserDemuxerAndroid, message) |
77 IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_DemuxerReady, OnDemuxerReady) | 76 IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_DemuxerReady, OnDemuxerReady) |
78 IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_ReadFromDemuxerAck, | 77 IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_ReadFromDemuxerAck, |
79 OnReadFromDemuxerAck) | 78 OnReadFromDemuxerAck) |
80 IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_DurationChanged, | 79 IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_DurationChanged, |
81 OnDurationChanged) | 80 OnDurationChanged) |
82 IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_DemuxerSeekDone, | 81 IPC_MESSAGE_HANDLER(MediaPlayerHostMsg_DemuxerSeekDone, |
83 OnDemuxerSeekDone) | 82 OnDemuxerSeekDone) |
84 IPC_MESSAGE_UNHANDLED(handled = false) | 83 IPC_MESSAGE_UNHANDLED(handled = false) |
85 IPC_END_MESSAGE_MAP() | 84 IPC_END_MESSAGE_MAP() |
86 return handled; | 85 return handled; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 134 |
136 void BrowserDemuxerAndroid::OnDurationChanged(int demuxer_client_id, | 135 void BrowserDemuxerAndroid::OnDurationChanged(int demuxer_client_id, |
137 const base::TimeDelta& duration) { | 136 const base::TimeDelta& duration) { |
138 media::DemuxerAndroidClient* client = | 137 media::DemuxerAndroidClient* client = |
139 demuxer_clients_.Lookup(demuxer_client_id); | 138 demuxer_clients_.Lookup(demuxer_client_id); |
140 if (client) | 139 if (client) |
141 client->OnDemuxerDurationChanged(duration); | 140 client->OnDemuxerDurationChanged(duration); |
142 } | 141 } |
143 | 142 |
144 } // namespace content | 143 } // namespace content |
OLD | NEW |