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 "chrome/browser/media/android/remote/remote_media_player_manager.h" | 5 #include "chrome/browser/media/android/remote/remote_media_player_manager.h" |
6 | 6 |
7 #include "chrome/browser/android/tab_android.h" | 7 #include "chrome/browser/android/tab_android.h" |
8 #include "chrome/common/chrome_content_client.h" | 8 #include "chrome/common/chrome_content_client.h" |
9 #include "content/common/media/media_player_messages_android.h" | 9 #include "content/common/media/media_player_messages_android.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
11 #include "ui/gfx/android/java_bitmap.h" | 11 #include "ui/gfx/android/java_bitmap.h" |
12 | 12 |
13 using media::MediaPlayerAndroid; | 13 using media::MediaPlayerAndroid; |
14 | 14 |
15 namespace remote_media { | 15 namespace remote_media { |
16 | 16 |
17 RemoteMediaPlayerManager::RemoteMediaPlayerManager( | 17 RemoteMediaPlayerManager::RemoteMediaPlayerManager( |
18 content::RenderFrameHost* render_frame_host, | 18 content::RenderFrameHost* render_frame_host) |
19 content::MediaPlayersObserver* audio_monitor) | 19 : BrowserMediaPlayerManager(render_frame_host), |
20 : BrowserMediaPlayerManager(render_frame_host, audio_monitor), | |
21 weak_ptr_factory_(this) { | 20 weak_ptr_factory_(this) { |
22 } | 21 } |
23 | 22 |
24 RemoteMediaPlayerManager::~RemoteMediaPlayerManager() {} | 23 RemoteMediaPlayerManager::~RemoteMediaPlayerManager() {} |
25 | 24 |
26 void RemoteMediaPlayerManager::OnStart(int player_id) { | 25 void RemoteMediaPlayerManager::OnStart(int player_id) { |
27 // TODO(aberent) This assumes this is the first time we have started this | 26 // TODO(aberent) This assumes this is the first time we have started this |
28 // video, rather than restarting after pause. There is a lot of logic here | 27 // video, rather than restarting after pause. There is a lot of logic here |
29 // that is unnecessary if we are restarting after pause. | 28 // that is unnecessary if we are restarting after pause. |
30 if (MaybeStartPlayingRemotely(player_id)) | 29 if (MaybeStartPlayingRemotely(player_id)) |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 RoutingID(), player_id, duration, | 300 RoutingID(), player_id, duration, |
302 replaced_local_player_->GetVideoWidth(), | 301 replaced_local_player_->GetVideoWidth(), |
303 replaced_local_player_->GetVideoHeight(), success)); | 302 replaced_local_player_->GetVideoHeight(), success)); |
304 } else { | 303 } else { |
305 BrowserMediaPlayerManager::OnMediaMetadataChanged(player_id, duration, | 304 BrowserMediaPlayerManager::OnMediaMetadataChanged(player_id, duration, |
306 width, height, success); | 305 width, height, success); |
307 } | 306 } |
308 } | 307 } |
309 | 308 |
310 } // namespace remote_media | 309 } // namespace remote_media |
OLD | NEW |