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

Side by Side Diff: android_webview/browser/test/rendering_test.cc

Issue 2036023002: Rewire Android WebView's compositor changed signal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use web_contents_ Created 4 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
« no previous file with comments | « android_webview/browser/render_thread_manager.cc ('k') | android_webview/native/aw_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 DCHECK(ui_task_runner_->BelongsToCurrentThread()); 49 DCHECK(ui_task_runner_->BelongsToCurrentThread());
50 if (window_.get()) 50 if (window_.get())
51 window_->Detach(); 51 window_->Detach();
52 } 52 }
53 53
54 void RenderingTest::SetUpTestHarness() { 54 void RenderingTest::SetUpTestHarness() {
55 DCHECK(!browser_view_renderer_.get()); 55 DCHECK(!browser_view_renderer_.get());
56 DCHECK(!functor_.get()); 56 DCHECK(!functor_.get());
57 browser_view_renderer_.reset( 57 browser_view_renderer_.reset(
58 new TestBrowserViewRenderer(this, base::ThreadTaskRunnerHandle::Get())); 58 new TestBrowserViewRenderer(this, base::ThreadTaskRunnerHandle::Get()));
59 browser_view_renderer_->SetActiveCompositorID(CompositorID(0, 0));
59 InitializeCompositor(); 60 InitializeCompositor();
60 std::unique_ptr<FakeWindow> window( 61 std::unique_ptr<FakeWindow> window(
61 new FakeWindow(browser_view_renderer_.get(), this, gfx::Rect(100, 100))); 62 new FakeWindow(browser_view_renderer_.get(), this, gfx::Rect(100, 100)));
62 functor_.reset(new FakeFunctor); 63 functor_.reset(new FakeFunctor);
63 functor_->Init(window.get(), 64 functor_->Init(window.get(),
64 base::WrapUnique(new RenderThreadManager( 65 base::WrapUnique(new RenderThreadManager(
65 functor_.get(), base::ThreadTaskRunnerHandle::Get()))); 66 functor_.get(), base::ThreadTaskRunnerHandle::Get())));
66 browser_view_renderer_->SetCurrentCompositorFrameConsumer( 67 browser_view_renderer_->SetCurrentCompositorFrameConsumer(
67 functor_->GetCompositorFrameConsumer()); 68 functor_->GetCompositorFrameConsumer());
68 window_ = std::move(window); 69 window_ = std::move(window);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void RenderingTest::PostInvalidate() { 152 void RenderingTest::PostInvalidate() {
152 if (window_) 153 if (window_)
153 window_->PostInvalidate(); 154 window_->PostInvalidate();
154 } 155 }
155 156
156 gfx::Point RenderingTest::GetLocationOnScreen() { 157 gfx::Point RenderingTest::GetLocationOnScreen() {
157 return gfx::Point(); 158 return gfx::Point();
158 } 159 }
159 160
160 } // namespace android_webview 161 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/render_thread_manager.cc ('k') | android_webview/native/aw_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698