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

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

Issue 2189113002: Rename CalledOnValidSequencedThread() to CalledOnValidSequence(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | base/id_map.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/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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 functor->Draw(hooks_); 154 functor->Draw(hooks_);
155 } 155 }
156 156
157 void FakeWindow::DrawFunctorOnRT(FakeFunctor* functor, 157 void FakeWindow::DrawFunctorOnRT(FakeFunctor* functor,
158 base::WaitableEvent* sync) { 158 base::WaitableEvent* sync) {
159 ProcessSyncOnRT(functor, sync); 159 ProcessSyncOnRT(functor, sync);
160 ProcessDrawOnRT(functor); 160 ProcessDrawOnRT(functor);
161 } 161 }
162 162
163 void FakeWindow::CheckCurrentlyOnUIThread() { 163 void FakeWindow::CheckCurrentlyOnUIThread() {
164 DCHECK(ui_checker_.CalledOnValidSequencedThread()); 164 DCHECK(ui_checker_.CalledOnValidSequence());
165 } 165 }
166 166
167 void FakeWindow::CreateRenderThreadIfNeeded() { 167 void FakeWindow::CreateRenderThreadIfNeeded() {
168 CheckCurrentlyOnUIThread(); 168 CheckCurrentlyOnUIThread();
169 if (render_thread_) { 169 if (render_thread_) {
170 DCHECK(render_thread_loop_); 170 DCHECK(render_thread_loop_);
171 return; 171 return;
172 } 172 }
173 render_thread_.reset(new base::Thread("TestRenderThread")); 173 render_thread_.reset(new base::Thread("TestRenderThread"));
174 render_thread_->Start(); 174 render_thread_->Start();
(...skipping 24 matching lines...) Expand all
199 CheckCurrentlyOnRT(); 199 CheckCurrentlyOnRT();
200 if (context_) { 200 if (context_) {
201 DCHECK(!context_->IsCurrent(surface_.get())); 201 DCHECK(!context_->IsCurrent(surface_.get()));
202 context_ = nullptr; 202 context_ = nullptr;
203 surface_ = nullptr; 203 surface_ = nullptr;
204 } 204 }
205 sync->Signal(); 205 sync->Signal();
206 } 206 }
207 207
208 void FakeWindow::CheckCurrentlyOnRT() { 208 void FakeWindow::CheckCurrentlyOnRT() {
209 DCHECK(rt_checker_.CalledOnValidSequencedThread()); 209 DCHECK(rt_checker_.CalledOnValidSequence());
210 } 210 }
211 211
212 FakeFunctor::FakeFunctor() : window_(nullptr) {} 212 FakeFunctor::FakeFunctor() : window_(nullptr) {}
213 213
214 FakeFunctor::~FakeFunctor() { 214 FakeFunctor::~FakeFunctor() {
215 render_thread_manager_.reset(); 215 render_thread_manager_.reset();
216 } 216 }
217 217
218 void FakeFunctor::Init( 218 void FakeFunctor::Init(
219 FakeWindow* window, 219 FakeWindow* window,
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 268
269 bool FakeFunctor::RequestInvokeGL(bool wait_for_completion) { 269 bool FakeFunctor::RequestInvokeGL(bool wait_for_completion) {
270 DCHECK(window_); 270 DCHECK(window_);
271 window_->RequestInvokeGL(this, wait_for_completion); 271 window_->RequestInvokeGL(this, wait_for_completion);
272 return true; 272 return true;
273 } 273 }
274 274
275 void FakeFunctor::DetachFunctorFromView() {} 275 void FakeFunctor::DetachFunctorFromView() {}
276 276
277 } // namespace android_webview 277 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | base/id_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698