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

Side by Side Diff: content/browser/android/surface_texture_peer_browser_impl.cc

Issue 628333003: Remove implicit conversions from scoped_refptr to T* in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/android/surface_texture_peer_browser_impl.h" 5 #include "content/browser/android/surface_texture_peer_browser_impl.h"
6 6
7 #include "content/browser/frame_host/render_frame_host_impl.h" 7 #include "content/browser/frame_host/render_frame_host_impl.h"
8 #include "content/browser/media/android/browser_media_player_manager.h" 8 #include "content/browser/media/android/browser_media_player_manager.h"
9 #include "content/browser/media/media_web_contents_observer.h" 9 #include "content/browser/media/media_web_contents_observer.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return; 55 return;
56 } 56 }
57 57
58 media::MediaPlayerAndroid* player = player_manager->GetPlayer(player_id); 58 media::MediaPlayerAndroid* player = player_manager->GetPlayer(player_id);
59 if (!player) { 59 if (!player) {
60 DVLOG(1) << "Cannot find media player for player_id " << player_id; 60 DVLOG(1) << "Cannot find media player for player_id " << player_id;
61 return; 61 return;
62 } 62 }
63 63
64 if (player != player_manager->GetFullscreenPlayer()) { 64 if (player != player_manager->GetFullscreenPlayer()) {
65 gfx::ScopedJavaSurface scoped_surface(surface_texture); 65 gfx::ScopedJavaSurface scoped_surface(surface_texture.get());
66 player->SetVideoSurface(scoped_surface.Pass()); 66 player->SetVideoSurface(scoped_surface.Pass());
67 } 67 }
68 } 68 }
69 69
70 } // anonymous namespace 70 } // anonymous namespace
71 71
72 SurfaceTexturePeerBrowserImpl::SurfaceTexturePeerBrowserImpl() { 72 SurfaceTexturePeerBrowserImpl::SurfaceTexturePeerBrowserImpl() {
73 } 73 }
74 74
75 SurfaceTexturePeerBrowserImpl::~SurfaceTexturePeerBrowserImpl() { 75 SurfaceTexturePeerBrowserImpl::~SurfaceTexturePeerBrowserImpl() {
76 } 76 }
77 77
78 void SurfaceTexturePeerBrowserImpl::EstablishSurfaceTexturePeer( 78 void SurfaceTexturePeerBrowserImpl::EstablishSurfaceTexturePeer(
79 base::ProcessHandle render_process_handle, 79 base::ProcessHandle render_process_handle,
80 scoped_refptr<gfx::SurfaceTexture> surface_texture, 80 scoped_refptr<gfx::SurfaceTexture> surface_texture,
81 int render_frame_id, 81 int render_frame_id,
82 int player_id) { 82 int player_id) {
83 if (!surface_texture.get()) 83 if (!surface_texture.get())
84 return; 84 return;
85 85
86 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind( 86 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
87 &SetSurfacePeer, surface_texture, render_process_handle, 87 &SetSurfacePeer, surface_texture, render_process_handle,
88 render_frame_id, player_id)); 88 render_frame_id, player_id));
89 } 89 }
90 90
91 } // namespace content 91 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/overscroll_glow.cc ('k') | content/browser/power_save_blocker_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698