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

Side by Side Diff: mojo/common/message_pump_mojo.h

Issue 461133002: Revert of Adds some CHECKs to MessagePumpMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/common/data_pipe_utils.cc ('k') | mojo/common/message_pump_mojo.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_COMMON_MESSAGE_PUMP_MOJO_H_ 5 #ifndef MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
6 #define MOJO_COMMON_MESSAGE_PUMP_MOJO_H_ 6 #define MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 MessagePumpMojo(); 25 MessagePumpMojo();
26 virtual ~MessagePumpMojo(); 26 virtual ~MessagePumpMojo();
27 27
28 // Static factory function (for using with |base::Thread::Options|, wrapped 28 // Static factory function (for using with |base::Thread::Options|, wrapped
29 // using |base::Bind()|). 29 // using |base::Bind()|).
30 static scoped_ptr<base::MessagePump> Create(); 30 static scoped_ptr<base::MessagePump> Create();
31 31
32 // Registers a MessagePumpMojoHandler for the specified handle. Only one 32 // Registers a MessagePumpMojoHandler for the specified handle. Only one
33 // handler can be registered for a specified handle. 33 // handler can be registered for a specified handle.
34 // NOTE: a value of 0 for |deadline| indicates an indefinite timeout.
35 void AddHandler(MessagePumpMojoHandler* handler, 34 void AddHandler(MessagePumpMojoHandler* handler,
36 const Handle& handle, 35 const Handle& handle,
37 MojoHandleSignals wait_signals, 36 MojoHandleSignals wait_signals,
38 base::TimeTicks deadline); 37 base::TimeTicks deadline);
39 38
40 void RemoveHandler(const Handle& handle); 39 void RemoveHandler(const Handle& handle);
41 40
42 // MessagePump: 41 // MessagePump:
43 virtual void Run(Delegate* delegate) OVERRIDE; 42 virtual void Run(Delegate* delegate) OVERRIDE;
44 virtual void Quit() OVERRIDE; 43 virtual void Quit() OVERRIDE;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // notify it. 98 // notify it.
100 int next_handler_id_; 99 int next_handler_id_;
101 100
102 DISALLOW_COPY_AND_ASSIGN(MessagePumpMojo); 101 DISALLOW_COPY_AND_ASSIGN(MessagePumpMojo);
103 }; 102 };
104 103
105 } // namespace common 104 } // namespace common
106 } // namespace mojo 105 } // namespace mojo
107 106
108 #endif // MOJO_COMMON_MESSAGE_PUMP_MOJO_H_ 107 #endif // MOJO_COMMON_MESSAGE_PUMP_MOJO_H_
OLDNEW
« no previous file with comments | « mojo/common/data_pipe_utils.cc ('k') | mojo/common/message_pump_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698