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

Side by Side Diff: content/browser/media/android/browser_media_player_manager.cc

Issue 136343002: Remove Chrome for TV code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_media_player_manager.h" 5 #include "content/browser/media/android/browser_media_player_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/browser/android/content_view_core_impl.h" 8 #include "content/browser/android/content_view_core_impl.h"
9 #include "content/browser/media/android/browser_demuxer_android.h" 9 #include "content/browser/media/android/browser_demuxer_android.h"
10 #include "content/browser/media/android/media_resource_getter_impl.h" 10 #include "content/browser/media/android/media_resource_getter_impl.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 RenderViewHost* rvh) { 57 RenderViewHost* rvh) {
58 if (g_factory) 58 if (g_factory)
59 return g_factory(rvh); 59 return g_factory(rvh);
60 return new BrowserMediaPlayerManager(rvh); 60 return new BrowserMediaPlayerManager(rvh);
61 } 61 }
62 62
63 ContentViewCoreImpl* BrowserMediaPlayerManager::GetContentViewCore() const { 63 ContentViewCoreImpl* BrowserMediaPlayerManager::GetContentViewCore() const {
64 return ContentViewCoreImpl::FromWebContents(web_contents()); 64 return ContentViewCoreImpl::FromWebContents(web_contents());
65 } 65 }
66 66
67 #if !defined(GOOGLE_TV)
68 // static 67 // static
69 MediaPlayerAndroid* BrowserMediaPlayerManager::CreateMediaPlayer( 68 MediaPlayerAndroid* BrowserMediaPlayerManager::CreateMediaPlayer(
70 MediaPlayerHostMsg_Initialize_Type type, 69 MediaPlayerHostMsg_Initialize_Type type,
71 int player_id, 70 int player_id,
72 const GURL& url, 71 const GURL& url,
73 const GURL& first_party_for_cookies, 72 const GURL& first_party_for_cookies,
74 int demuxer_client_id, 73 int demuxer_client_id,
75 bool hide_url_log, 74 bool hide_url_log,
76 MediaPlayerManager* manager, 75 MediaPlayerManager* manager,
77 BrowserDemuxerAndroid* demuxer) { 76 BrowserDemuxerAndroid* demuxer) {
(...skipping 27 matching lines...) Expand all
105 104
106 case MEDIA_PLAYER_TYPE_MEDIA_SOURCE: { 105 case MEDIA_PLAYER_TYPE_MEDIA_SOURCE: {
107 return new MediaSourcePlayer( 106 return new MediaSourcePlayer(
108 player_id, manager, demuxer->CreateDemuxer(demuxer_client_id)); 107 player_id, manager, demuxer->CreateDemuxer(demuxer_client_id));
109 } 108 }
110 } 109 }
111 110
112 NOTREACHED(); 111 NOTREACHED();
113 return NULL; 112 return NULL;
114 } 113 }
115 #endif
116 114
117 BrowserMediaPlayerManager::BrowserMediaPlayerManager( 115 BrowserMediaPlayerManager::BrowserMediaPlayerManager(
118 RenderViewHost* render_view_host) 116 RenderViewHost* render_view_host)
119 : WebContentsObserver(WebContents::FromRenderViewHost(render_view_host)), 117 : WebContentsObserver(WebContents::FromRenderViewHost(render_view_host)),
120 fullscreen_player_id_(-1), 118 fullscreen_player_id_(-1),
121 pending_fullscreen_player_id_(-1), 119 pending_fullscreen_player_id_(-1),
122 web_contents_(WebContents::FromRenderViewHost(render_view_host)), 120 web_contents_(WebContents::FromRenderViewHost(render_view_host)),
123 weak_ptr_factory_(this) { 121 weak_ptr_factory_(this) {
124 } 122 }
125 123
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 if (pending_fullscreen_player_id_ != media_keys_id) 834 if (pending_fullscreen_player_id_ != media_keys_id)
837 return; 835 return;
838 836
839 pending_fullscreen_player_id_ = -1; 837 pending_fullscreen_player_id_ = -1;
840 MediaPlayerAndroid* player = GetPlayer(media_keys_id); 838 MediaPlayerAndroid* player = GetPlayer(media_keys_id);
841 if (player->IsPlaying()) 839 if (player->IsPlaying())
842 OnProtectedSurfaceRequested(media_keys_id); 840 OnProtectedSurfaceRequested(media_keys_id);
843 } 841 }
844 842
845 } // namespace content 843 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698