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

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

Issue 454433003: Adds some CHECKs to MessagePumpMojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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.
34 void AddHandler(MessagePumpMojoHandler* handler, 35 void AddHandler(MessagePumpMojoHandler* handler,
35 const Handle& handle, 36 const Handle& handle,
36 MojoHandleSignals wait_signals, 37 MojoHandleSignals wait_signals,
37 base::TimeTicks deadline); 38 base::TimeTicks deadline);
38 39
39 void RemoveHandler(const Handle& handle); 40 void RemoveHandler(const Handle& handle);
40 41
41 // MessagePump: 42 // MessagePump:
42 virtual void Run(Delegate* delegate) OVERRIDE; 43 virtual void Run(Delegate* delegate) OVERRIDE;
43 virtual void Quit() OVERRIDE; 44 virtual void Quit() OVERRIDE;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 // notify it. 99 // notify it.
99 int next_handler_id_; 100 int next_handler_id_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(MessagePumpMojo); 102 DISALLOW_COPY_AND_ASSIGN(MessagePumpMojo);
102 }; 103 };
103 104
104 } // namespace common 105 } // namespace common
105 } // namespace mojo 106 } // namespace mojo
106 107
107 #endif // MOJO_COMMON_MESSAGE_PUMP_MOJO_H_ 108 #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