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

Unified Diff: ppapi/shared_impl/tracked_callback.h

Issue 18063005: Do PPB_FileIO Query and Read in the plugin process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up and add comments. Created 7 years, 4 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
Index: ppapi/shared_impl/tracked_callback.h
diff --git a/ppapi/shared_impl/tracked_callback.h b/ppapi/shared_impl/tracked_callback.h
index 4917990e3cfeafa31ebb70623bc4538c1685b3a9..c4bf5cfd279d3c23fe134835301c94a5001584a3 100644
--- a/ppapi/shared_impl/tracked_callback.h
+++ b/ppapi/shared_impl/tracked_callback.h
@@ -98,6 +98,11 @@ class PPAPI_SHARED_EXPORT TrackedCallback
// completion.
bool aborted() const { return aborted_; }
+ // Returns true if this is a blocking callback.
+ bool is_blocking() {
+ return !callback_.func;
+ }
+
// Determines if the given callback is pending. A callback is pending if it
// has not completed and has not been aborted. When receiving a plugin call,
// use this to detect if |callback| represents an operation in progress. When
@@ -113,10 +118,6 @@ class PPAPI_SHARED_EXPORT TrackedCallback
static bool IsScheduledToRun(const scoped_refptr<TrackedCallback>& callback);
protected:
- bool is_blocking() {
- return !callback_.func;
- }
-
bool is_required() {
return (callback_.func &&
!(callback_.flags & PP_COMPLETIONCALLBACK_FLAG_OPTIONAL));

Powered by Google App Engine
This is Rietveld 408576698