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

Unified Diff: chrome/browser/extensions/api/api_function.h

Issue 10273016: Refactor the socket API to remove onEvent callback in socket.create() function. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/api_function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/api_function.h
diff --git a/chrome/browser/extensions/api/api_function.h b/chrome/browser/extensions/api/api_function.h
index 416035fbf238a79a63920ec11437991608e81a6b..229d1c59e9aec7d442ac0b37cd438e29debf2520 100644
--- a/chrome/browser/extensions/api/api_function.h
+++ b/chrome/browser/extensions/api/api_function.h
@@ -27,7 +27,13 @@ class AsyncIOAPIFunction : public AsyncExtensionFunction {
virtual bool Prepare() = 0;
// Do actual work. Guaranteed to happen on IO thread.
- virtual void Work() = 0;
+ virtual void Work();
+
+ // Start the asynchronous work. Guraranteed to happen on IO thread.
+ virtual void AsyncWorkStart();
+
+ // Notify AsyncIOAPIFunction that the work is completed
+ void AsyncWorkCompleted();
// Respond. Guaranteed to happen on UI thread.
virtual bool Respond() = 0;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/api_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698