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 27 matching lines...) Expand all Loading... |
38 void OnParentDrawConstraintsUpdated( | 38 void OnParentDrawConstraintsUpdated( |
39 CompositorFrameConsumer* compositor_frame_consumer) override { | 39 CompositorFrameConsumer* compositor_frame_consumer) override { |
40 BrowserViewRenderer::OnParentDrawConstraintsUpdated( | 40 BrowserViewRenderer::OnParentDrawConstraintsUpdated( |
41 compositor_frame_consumer); | 41 compositor_frame_consumer); |
42 rendering_test_->OnParentDrawConstraintsUpdated(); | 42 rendering_test_->OnParentDrawConstraintsUpdated(); |
43 } | 43 } |
44 | 44 |
45 private: | 45 private: |
46 RenderingTest* const rendering_test_; | 46 RenderingTest* const rendering_test_; |
47 }; | 47 }; |
48 } | 48 } // namespace |
49 | 49 |
50 RenderingTest::RenderingTest() : message_loop_(new base::MessageLoop) { | 50 RenderingTest::RenderingTest() : message_loop_(new base::MessageLoop) { |
51 // TODO(boliu): Update unit tests to async code path. | 51 // TODO(boliu): Update unit tests to async code path. |
52 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 52 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
53 switches::kSyncOnDrawHardware); | 53 switches::kSyncOnDrawHardware); |
54 ui_task_runner_ = base::ThreadTaskRunnerHandle::Get(); | 54 ui_task_runner_ = base::ThreadTaskRunnerHandle::Get(); |
55 } | 55 } |
56 | 56 |
57 RenderingTest::~RenderingTest() { | 57 RenderingTest::~RenderingTest() { |
58 DCHECK(ui_task_runner_->BelongsToCurrentThread()); | 58 DCHECK(ui_task_runner_->BelongsToCurrentThread()); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 void RenderingTest::PostInvalidate() { | 159 void RenderingTest::PostInvalidate() { |
160 if (window_) | 160 if (window_) |
161 window_->PostInvalidate(); | 161 window_->PostInvalidate(); |
162 } | 162 } |
163 | 163 |
164 gfx::Point RenderingTest::GetLocationOnScreen() { | 164 gfx::Point RenderingTest::GetLocationOnScreen() { |
165 return gfx::Point(); | 165 return gfx::Point(); |
166 } | 166 } |
167 | 167 |
168 } // namespace android_webview | 168 } // namespace android_webview |
OLD | NEW |