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

Side by Side Diff: android_webview/browser/aw_render_thread_context_provider.cc

Issue 1317743002: cc: Implement shared worker contexts. (v1) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: surfaces_context_provider fix Created 5 years, 3 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698