| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/aw_render_thread_context_provider.h" | 5 #include "android_webview/browser/aw_render_thread_context_provider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 if (destroyed_) | 192 if (destroyed_) |
| 193 return; | 193 return; |
| 194 destroyed_ = true; | 194 destroyed_ = true; |
| 195 | 195 |
| 196 if (!lost_context_callback_.is_null()) | 196 if (!lost_context_callback_.is_null()) |
| 197 base::ResetAndReturn(&lost_context_callback_).Run(); | 197 base::ResetAndReturn(&lost_context_callback_).Run(); |
| 198 if (gr_context_) | 198 if (gr_context_) |
| 199 gr_context_->abandonContext(); | 199 gr_context_->abandonContext(); |
| 200 } | 200 } |
| 201 | 201 |
| 202 bool AwRenderThreadContextProvider::HasBeenDestroyed() { |
| 203 DCHECK(main_thread_checker_.CalledOnValidThread()); |
| 204 return destroyed_; |
| 205 } |
| 206 |
| 202 } // namespace android_webview | 207 } // namespace android_webview |
| OLD | NEW |