| OLD | NEW |
| 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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 bool destroyed_; | 185 bool destroyed_; |
| 186 | 186 |
| 187 DISALLOW_COPY_AND_ASSIGN(TestWindowObserver); | 187 DISALLOW_COPY_AND_ASSIGN(TestWindowObserver); |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 class FakeFrameSubscriber : public RenderWidgetHostViewFrameSubscriber { | 190 class FakeFrameSubscriber : public RenderWidgetHostViewFrameSubscriber { |
| 191 public: | 191 public: |
| 192 FakeFrameSubscriber(gfx::Size size, base::Callback<void(bool)> callback) | 192 FakeFrameSubscriber(gfx::Size size, base::Callback<void(bool)> callback) |
| 193 : size_(size), callback_(callback) {} | 193 : size_(size), callback_(callback) {} |
| 194 | 194 |
| 195 virtual bool ShouldCaptureFrame(base::TimeTicks present_time, | 195 virtual bool ShouldCaptureFrame(const gfx::Rect& damage_rect, |
| 196 base::TimeTicks present_time, |
| 196 scoped_refptr<media::VideoFrame>* storage, | 197 scoped_refptr<media::VideoFrame>* storage, |
| 197 DeliverFrameCallback* callback) OVERRIDE { | 198 DeliverFrameCallback* callback) OVERRIDE { |
| 198 *storage = media::VideoFrame::CreateFrame(media::VideoFrame::YV12, | 199 *storage = media::VideoFrame::CreateFrame(media::VideoFrame::YV12, |
| 199 size_, | 200 size_, |
| 200 gfx::Rect(size_), | 201 gfx::Rect(size_), |
| 201 size_, | 202 size_, |
| 202 base::TimeDelta()); | 203 base::TimeDelta()); |
| 203 *callback = base::Bind(&FakeFrameSubscriber::CallbackMethod, callback_); | 204 *callback = base::Bind(&FakeFrameSubscriber::CallbackMethod, callback_); |
| 204 return true; | 205 return true; |
| 205 } | 206 } |
| (...skipping 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2677 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->completed_mode()); | 2678 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->completed_mode()); |
| 2678 | 2679 |
| 2679 SimulateGestureEvent(WebInputEvent::GestureScrollEnd, | 2680 SimulateGestureEvent(WebInputEvent::GestureScrollEnd, |
| 2680 blink::WebGestureDeviceTouchscreen); | 2681 blink::WebGestureDeviceTouchscreen); |
| 2681 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode()); | 2682 EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode()); |
| 2682 EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode()); | 2683 EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode()); |
| 2683 EXPECT_EQ(3U, sink_->message_count()); | 2684 EXPECT_EQ(3U, sink_->message_count()); |
| 2684 } | 2685 } |
| 2685 | 2686 |
| 2686 } // namespace content | 2687 } // namespace content |
| OLD | NEW |