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

Unified Diff: ios/web/public/web_thread.h

Issue 1406983008: [iOS] ios/web no longer depends on content::BrowserThread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/test/test_web_thread_bundle.h ('k') | ios/web/test/test_web_thread_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/web_thread.h
diff --git a/ios/web/public/web_thread.h b/ios/web/public/web_thread.h
index 99f41c35014009a9373d597765ce7bc2a1d97fe0..c51cc9806ed057f307af96afd6b48730d2d30a72 100644
--- a/ios/web/public/web_thread.h
+++ b/ios/web/public/web_thread.h
@@ -24,6 +24,8 @@ class Location;
namespace web {
+class WebThreadDelegate;
+
// Use DCHECK_CURRENTLY_ON_WEB_THREAD(WebThread::ID) to assert that a function
// can only be called on the named WebThread.
// TODO(ios): rename to DCHECK_CURRENTLY_ON once iOS is independent from
@@ -205,6 +207,16 @@ class WebThread {
static scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunnerForThread(
ID identifier);
+ // Sets the delegate for the specified WebThread.
+ //
+ // Only one delegate may be registered at a time. Delegates may be
+ // unregistered by providing a nullptr pointer.
+ //
+ // If the caller unregisters a delegate before CleanUp has been
+ // called, it must perform its own locking to ensure the delegate is
+ // not deleted while unregistering.
+ static void SetDelegate(ID identifier, WebThreadDelegate* delegate);
+
// Returns an appropriate error message for when
// DCHECK_CURRENTLY_ON_WEB_THREAD() fails.
static std::string GetDCheckCurrentlyOnErrorMessage(ID expected);
« no previous file with comments | « ios/web/public/test/test_web_thread_bundle.h ('k') | ios/web/test/test_web_thread_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698