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

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

Issue 1904453004: Transfer DrawGLFunctor ownership from AwContents to AwGLFunctor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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/fake_window.h" 5 #include "android_webview/browser/test/fake_window.h"
6 6
7 #include "android_webview/browser/browser_view_renderer.h" 7 #include "android_webview/browser/browser_view_renderer.h"
8 #include "android_webview/browser/child_frame.h" 8 #include "android_webview/browser/child_frame.h"
9 #include "android_webview/browser/render_thread_manager.h" 9 #include "android_webview/browser/render_thread_manager.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 base::WaitableEvent completion(true, false); 72 base::WaitableEvent completion(true, false);
73 render_thread_loop_->PostTask( 73 render_thread_loop_->PostTask(
74 FROM_HERE, base::Bind(&FakeWindow::DestroyOnRT, base::Unretained(this), 74 FROM_HERE, base::Bind(&FakeWindow::DestroyOnRT, base::Unretained(this),
75 &completion)); 75 &completion));
76 completion.Wait(); 76 completion.Wait();
77 } 77 }
78 78
79 render_thread_.reset(); 79 render_thread_.reset();
80 } 80 }
81 81
82 void FakeWindow::RequestDrawGL(bool wait_for_completion) { 82 void FakeWindow::RequestInvokeGL(bool wait_for_completion) {
83 CheckCurrentlyOnUIThread(); 83 CheckCurrentlyOnUIThread();
84 base::WaitableEvent completion(true, false); 84 base::WaitableEvent completion(true, false);
85 render_thread_loop_->PostTask( 85 render_thread_loop_->PostTask(
86 FROM_HERE, 86 FROM_HERE,
87 base::Bind(&FakeWindow::ProcessFunctorOnRT, base::Unretained(this), 87 base::Bind(&FakeWindow::ProcessFunctorOnRT, base::Unretained(this),
88 wait_for_completion ? &completion : nullptr)); 88 wait_for_completion ? &completion : nullptr));
89 if (wait_for_completion) 89 if (wait_for_completion)
90 completion.Wait(); 90 completion.Wait();
91 } 91 }
92 92
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 surface_ = nullptr; 211 surface_ = nullptr;
212 } 212 }
213 sync->Signal(); 213 sync->Signal();
214 } 214 }
215 215
216 void FakeWindow::CheckCurrentlyOnRT() { 216 void FakeWindow::CheckCurrentlyOnRT() {
217 DCHECK(rt_checker_.CalledOnValidSequencedThread()); 217 DCHECK(rt_checker_.CalledOnValidSequencedThread());
218 } 218 }
219 219
220 } // namespace android_webview 220 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/test/fake_window.h ('k') | android_webview/browser/test/rendering_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698