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

Unified Diff: mojo/system/simple_dispatcher.h

Issue 325213004: Mojo: Wrap the satisfied/unsatisfied wait flags state in a single object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « mojo/system/shared_buffer_dispatcher.cc ('k') | mojo/system/simple_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/system/simple_dispatcher.h
diff --git a/mojo/system/simple_dispatcher.h b/mojo/system/simple_dispatcher.h
index 15a64d58d28bc13e413adf9f2b0b5361587bd42e..8258c2a8b6aca3e4419811ec867dbb399267fae7 100644
--- a/mojo/system/simple_dispatcher.h
+++ b/mojo/system/simple_dispatcher.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "mojo/system/dispatcher.h"
#include "mojo/system/system_impl_export.h"
+#include "mojo/system/wait_flags_state.h"
#include "mojo/system/waiter_list.h"
namespace mojo {
@@ -25,17 +26,12 @@ class MOJO_SYSTEM_IMPL_EXPORT SimpleDispatcher : public Dispatcher {
virtual ~SimpleDispatcher();
// To be called by subclasses when the state changes (so
- // |SatisfiedFlagsNoLock()| and |SatisfiableFlagsNoLock()| should be checked
- // again). Must be called under lock.
- void StateChangedNoLock();
-
- // These should return the wait flags that are satisfied by the object's
- // current state and those that may eventually be satisfied by this object's
- // state, respectively. They should be overridden by subclasses to reflect
- // their notion of state. They are never called after the dispatcher has been
- // closed. They are called under |lock_|.
- virtual MojoWaitFlags SatisfiedFlagsNoLock() const = 0;
- virtual MojoWaitFlags SatisfiableFlagsNoLock() const = 0;
+ // |GetWaitFlagsStateNoLock()| should be checked again). Must be called under
+ // lock.
+ void WaitFlagsStateChangedNoLock();
+
+ // Never called after the dispatcher has been closed; called under |lock_|.
+ virtual WaitFlagsState GetWaitFlagsStateNoLock() const = 0;
// |Dispatcher| protected methods:
virtual void CancelAllWaitersNoLock() OVERRIDE;
« no previous file with comments | « mojo/system/shared_buffer_dispatcher.cc ('k') | mojo/system/simple_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698