OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "android_webview/browser/test/rendering_test.h" | 5 #include "android_webview/browser/test/rendering_test.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "android_webview/browser/browser_view_renderer.h" | 9 #include "android_webview/browser/browser_view_renderer.h" |
10 #include "android_webview/browser/child_frame.h" | 10 #include "android_webview/browser/child_frame.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 DCHECK(!browser_view_renderer_.get()); | 56 DCHECK(!browser_view_renderer_.get()); |
57 DCHECK(!functor_.get()); | 57 DCHECK(!functor_.get()); |
58 browser_view_renderer_.reset( | 58 browser_view_renderer_.reset( |
59 new TestBrowserViewRenderer(this, base::ThreadTaskRunnerHandle::Get())); | 59 new TestBrowserViewRenderer(this, base::ThreadTaskRunnerHandle::Get())); |
60 browser_view_renderer_->SetActiveCompositorID(CompositorID(0, 0)); | 60 browser_view_renderer_->SetActiveCompositorID(CompositorID(0, 0)); |
61 InitializeCompositor(); | 61 InitializeCompositor(); |
62 std::unique_ptr<FakeWindow> window( | 62 std::unique_ptr<FakeWindow> window( |
63 new FakeWindow(browser_view_renderer_.get(), this, gfx::Rect(100, 100))); | 63 new FakeWindow(browser_view_renderer_.get(), this, gfx::Rect(100, 100))); |
64 functor_.reset(new FakeFunctor); | 64 functor_.reset(new FakeFunctor); |
65 functor_->Init(window.get(), | 65 functor_->Init(window.get(), |
66 base::WrapUnique(new RenderThreadManager( | 66 base::MakeUnique<RenderThreadManager>( |
67 functor_.get(), base::ThreadTaskRunnerHandle::Get()))); | 67 functor_.get(), base::ThreadTaskRunnerHandle::Get())); |
68 browser_view_renderer_->SetCurrentCompositorFrameConsumer( | 68 browser_view_renderer_->SetCurrentCompositorFrameConsumer( |
69 functor_->GetCompositorFrameConsumer()); | 69 functor_->GetCompositorFrameConsumer()); |
70 window_ = std::move(window); | 70 window_ = std::move(window); |
71 } | 71 } |
72 | 72 |
73 CompositorFrameConsumer* RenderingTest::GetCompositorFrameConsumer() { | 73 CompositorFrameConsumer* RenderingTest::GetCompositorFrameConsumer() { |
74 return functor_->GetCompositorFrameConsumer(); | 74 return functor_->GetCompositorFrameConsumer(); |
75 } | 75 } |
76 | 76 |
77 CompositorFrameProducer* RenderingTest::GetCompositorFrameProducer() { | 77 CompositorFrameProducer* RenderingTest::GetCompositorFrameProducer() { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 void RenderingTest::PostInvalidate() { | 157 void RenderingTest::PostInvalidate() { |
158 if (window_) | 158 if (window_) |
159 window_->PostInvalidate(); | 159 window_->PostInvalidate(); |
160 } | 160 } |
161 | 161 |
162 gfx::Point RenderingTest::GetLocationOnScreen() { | 162 gfx::Point RenderingTest::GetLocationOnScreen() { |
163 return gfx::Point(); | 163 return gfx::Point(); |
164 } | 164 } |
165 | 165 |
166 } // namespace android_webview | 166 } // namespace android_webview |
OLD | NEW |