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

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

Issue 655133002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (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
« no previous file with comments | « content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1852 1852
1853 scoped_ptr<FakeFrameSubscriber> frame_subscriber(new FakeFrameSubscriber( 1853 scoped_ptr<FakeFrameSubscriber> frame_subscriber(new FakeFrameSubscriber(
1854 view_rect.size(), 1854 view_rect.size(),
1855 base::Bind(&RenderWidgetHostViewAuraCopyRequestTest::CallbackMethod, 1855 base::Bind(&RenderWidgetHostViewAuraCopyRequestTest::CallbackMethod,
1856 base::Unretained(this), 1856 base::Unretained(this),
1857 run_loop.QuitClosure()))); 1857 run_loop.QuitClosure())));
1858 1858
1859 EXPECT_EQ(0, callback_count_); 1859 EXPECT_EQ(0, callback_count_);
1860 EXPECT_FALSE(view_->last_copy_request_); 1860 EXPECT_FALSE(view_->last_copy_request_);
1861 1861
1862 view_->BeginFrameSubscription( 1862 view_->BeginFrameSubscription(frame_subscriber.Pass());
1863 frame_subscriber.PassAs<RenderWidgetHostViewFrameSubscriber>());
1864 view_->OnSwapCompositorFrame( 1863 view_->OnSwapCompositorFrame(
1865 1, MakeDelegatedFrame(1.f, view_rect.size(), gfx::Rect(view_rect))); 1864 1, MakeDelegatedFrame(1.f, view_rect.size(), gfx::Rect(view_rect)));
1866 1865
1867 EXPECT_EQ(0, callback_count_); 1866 EXPECT_EQ(0, callback_count_);
1868 EXPECT_TRUE(view_->last_copy_request_); 1867 EXPECT_TRUE(view_->last_copy_request_);
1869 EXPECT_TRUE(view_->last_copy_request_->has_texture_mailbox()); 1868 EXPECT_TRUE(view_->last_copy_request_->has_texture_mailbox());
1870 request = view_->last_copy_request_.Pass(); 1869 request = view_->last_copy_request_.Pass();
1871 1870
1872 // Send back the mailbox included in the request. There's no release callback 1871 // Send back the mailbox included in the request. There's no release callback
1873 // since the mailbox came from the RWHVA originally. 1872 // since the mailbox came from the RWHVA originally.
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->completed_mode()); 2847 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->completed_mode());
2849 2848
2850 SimulateGestureEvent(WebInputEvent::GestureScrollEnd, 2849 SimulateGestureEvent(WebInputEvent::GestureScrollEnd,
2851 blink::WebGestureDeviceTouchscreen); 2850 blink::WebGestureDeviceTouchscreen);
2852 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode()); 2851 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode());
2853 EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode()); 2852 EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode());
2854 EXPECT_EQ(3U, sink_->message_count()); 2853 EXPECT_EQ(3U, sink_->message_count());
2855 } 2854 }
2856 2855
2857 } // namespace content 2856 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_ui_proxy_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698