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

Unified Diff: mojo/message_pump/message_pump_mojo.h

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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/message_pump/handle_watcher_unittest.cc ('k') | mojo/message_pump/message_pump_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/message_pump/message_pump_mojo.h
diff --git a/mojo/common/message_pump_mojo.h b/mojo/message_pump/message_pump_mojo.h
similarity index 85%
rename from mojo/common/message_pump_mojo.h
rename to mojo/message_pump/message_pump_mojo.h
index 899f9799354b4986d0b85ccf93a3501362375a7c..8fcc48eaa5f85eadd5211e756d6fd05e7ac46788 100644
--- a/mojo/common/message_pump_mojo.h
+++ b/mojo/message_pump/message_pump_mojo.h
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
-#define MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
+#ifndef MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_
+#define MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_
#include <map>
+#include <utility>
+#include <vector>
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
@@ -13,8 +15,9 @@
#include "base/observer_list.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
-#include "mojo/common/mojo_common_export.h"
-#include "third_party/mojo/src/mojo/public/cpp/system/core.h"
+#include "mojo/public/c/system/result.h"
+#include "mojo/public/c/system/time.h"
+#include "mojo/public/cpp/system/handle.h"
namespace mojo {
namespace common {
@@ -22,7 +25,7 @@ namespace common {
class MessagePumpMojoHandler;
// Mojo implementation of MessagePump.
-class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
+class MessagePumpMojo : public base::MessagePump {
public:
class Observer {
public:
@@ -57,8 +60,8 @@ class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
void RemoveHandler(const Handle& handle);
- void AddObserver(Observer*);
- void RemoveObserver(Observer*);
+ void AddObserver(Observer* observer);
+ void RemoveObserver(Observer* observer);
// MessagePump:
void Run(Delegate* delegate) override;
@@ -82,6 +85,7 @@ class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
};
typedef std::map<Handle, Handler> HandleToHandler;
+ typedef std::vector<std::pair<Handle, Handler>> HandleToHandlerList;
// Implementation of Run().
void DoRunLoop(RunState* run_state, Delegate* delegate);
@@ -99,7 +103,7 @@ class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
void SignalControlPipe(const RunState& run_state);
- WaitState GetWaitState(const RunState& run_state) const;
+ void GetWaitState(const RunState& run_state, WaitState* wait_state) const;
// Returns the deadline for the call to MojoWaitMany().
MojoDeadline GetDeadlineForWait(const RunState& run_state) const;
@@ -125,7 +129,7 @@ class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
// notify it.
int next_handler_id_;
- ObserverList<Observer> observers_;
+ base::ObserverList<Observer> observers_;
DISALLOW_COPY_AND_ASSIGN(MessagePumpMojo);
};
@@ -133,4 +137,4 @@ class MOJO_COMMON_EXPORT MessagePumpMojo : public base::MessagePump {
} // namespace common
} // namespace mojo
-#endif // MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
+#endif // MOJO_MESSAGE_PUMP_MESSAGE_PUMP_MOJO_H_
« no previous file with comments | « mojo/message_pump/handle_watcher_unittest.cc ('k') | mojo/message_pump/message_pump_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698