| 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" |
| 11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 12 #include "base/thread_task_runner_handle.h" | |
| 13 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "base/threading/thread_task_runner_handle.h" |
| 14 #include "ui/gl/gl_bindings.h" | 14 #include "ui/gl/gl_bindings.h" |
| 15 | 15 |
| 16 namespace android_webview { | 16 namespace android_webview { |
| 17 | 17 |
| 18 class FakeWindow::ScopedMakeCurrent { | 18 class FakeWindow::ScopedMakeCurrent { |
| 19 public: | 19 public: |
| 20 ScopedMakeCurrent(FakeWindow* view_root) : view_root_(view_root) { | 20 ScopedMakeCurrent(FakeWindow* view_root) : view_root_(view_root) { |
| 21 DCHECK(!view_root_->context_current_); | 21 DCHECK(!view_root_->context_current_); |
| 22 view_root_->context_current_ = true; | 22 view_root_->context_current_ = true; |
| 23 bool result = view_root_->context_->MakeCurrent(view_root_->surface_.get()); | 23 bool result = view_root_->context_->MakeCurrent(view_root_->surface_.get()); |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 surface_ = nullptr; | 209 surface_ = nullptr; |
| 210 } | 210 } |
| 211 sync->Signal(); | 211 sync->Signal(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void FakeWindow::CheckCurrentlyOnRT() { | 214 void FakeWindow::CheckCurrentlyOnRT() { |
| 215 DCHECK(rt_checker_.CalledOnValidSequencedThread()); | 215 DCHECK(rt_checker_.CalledOnValidSequencedThread()); |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace android_webview | 218 } // namespace android_webview |
| OLD | NEW |