| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |