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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_browsertest.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop_proxy.h" 6 #include "base/message_loop_proxy.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "content/browser/gpu/gpu_data_manager_impl.h" 9 #include "content/browser/gpu/gpu_data_manager_impl.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 if (!view->CanCopyToVideoFrame()) { 385 if (!view->CanCopyToVideoFrame()) {
386 LOG(WARNING) << ("Blindly passing this test: " 386 LOG(WARNING) << ("Blindly passing this test: "
387 "CopyFromCompositingSurfaceToVideoFrame() not supported " 387 "CopyFromCompositingSurfaceToVideoFrame() not supported "
388 "on this platform."); 388 "on this platform.");
389 return; 389 return;
390 } 390 }
391 391
392 base::RunLoop run_loop; 392 base::RunLoop run_loop;
393 scoped_refptr<media::VideoFrame> first_output = 393 scoped_refptr<media::VideoFrame> first_output =
394 media::VideoFrame::CreateBlackFrame(frame_size()); 394 media::VideoFrame::CreateBlackFrame(frame_size());
395 ASSERT_TRUE(first_output); 395 ASSERT_TRUE(first_output.get());
396 scoped_refptr<media::VideoFrame> second_output = 396 scoped_refptr<media::VideoFrame> second_output =
397 media::VideoFrame::CreateBlackFrame(frame_size()); 397 media::VideoFrame::CreateBlackFrame(frame_size());
398 ASSERT_TRUE(second_output); 398 ASSERT_TRUE(second_output.get());
399 view->CopyFromCompositingSurfaceToVideoFrame( 399 view->CopyFromCompositingSurfaceToVideoFrame(
400 gfx::Rect(view->GetViewBounds().size()), first_output, 400 gfx::Rect(view->GetViewBounds().size()),
401 first_output,
401 base::Bind(&RenderWidgetHostViewBrowserTest::FrameDelivered, 402 base::Bind(&RenderWidgetHostViewBrowserTest::FrameDelivered,
402 base::Unretained(this), 403 base::Unretained(this),
403 base::MessageLoopProxy::current(), 404 base::MessageLoopProxy::current(),
404 base::Closure(), 405 base::Closure(),
405 base::Time::Now())); 406 base::Time::Now()));
406 view->CopyFromCompositingSurfaceToVideoFrame( 407 view->CopyFromCompositingSurfaceToVideoFrame(
407 gfx::Rect(view->GetViewBounds().size()), second_output, 408 gfx::Rect(view->GetViewBounds().size()), second_output,
408 base::Bind(&RenderWidgetHostViewBrowserTest::FrameDelivered, 409 base::Bind(&RenderWidgetHostViewBrowserTest::FrameDelivered,
409 base::Unretained(this), 410 base::Unretained(this),
410 base::MessageLoopProxy::current(), 411 base::MessageLoopProxy::current(),
411 run_loop.QuitClosure(), 412 run_loop.QuitClosure(),
412 base::Time::Now())); 413 base::Time::Now()));
413 run_loop.Run(); 414 run_loop.Run();
414 415
415 EXPECT_EQ(2, callback_invoke_count()); 416 EXPECT_EQ(2, callback_invoke_count());
416 EXPECT_EQ(2, frames_captured()); 417 EXPECT_EQ(2, frames_captured());
417 } 418 }
418 419
419 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) 420 #endif // !defined(OS_ANDROID) && !defined(OS_IOS)
420 421
421 } // namespace 422 } // namespace
422 } // namespace content 423 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698