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

Side by Side Diff: mojo/public/cpp/bindings/lib/router.h

Issue 339403003: Mojo: Make GetDefault{AsyncWaiter,Logger} static methods of Environment. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_ptr_internal.h ('k') | mojo/public/cpp/environment/DEPS » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "mojo/public/cpp/bindings/lib/connector.h" 10 #include "mojo/public/cpp/bindings/lib/connector.h"
11 #include "mojo/public/cpp/bindings/lib/filter_chain.h" 11 #include "mojo/public/cpp/bindings/lib/filter_chain.h"
12 #include "mojo/public/cpp/bindings/lib/shared_data.h" 12 #include "mojo/public/cpp/bindings/lib/shared_data.h"
13 #include "mojo/public/cpp/environment/environment.h"
13 14
14 namespace mojo { 15 namespace mojo {
15 namespace internal { 16 namespace internal {
16 17
17 class Router : public MessageReceiverWithResponder { 18 class Router : public MessageReceiverWithResponder {
18 public: 19 public:
19 Router(ScopedMessagePipeHandle message_pipe, 20 Router(ScopedMessagePipeHandle message_pipe,
20 FilterChain filters, 21 FilterChain filters,
21 const MojoAsyncWaiter* waiter = GetDefaultAsyncWaiter()); 22 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter());
22 virtual ~Router(); 23 virtual ~Router();
23 24
24 // Sets the receiver to handle messages read from the message pipe that do 25 // Sets the receiver to handle messages read from the message pipe that do
25 // not have the kMessageIsResponse flag set. 26 // not have the kMessageIsResponse flag set.
26 void set_incoming_receiver(MessageReceiverWithResponder* receiver) { 27 void set_incoming_receiver(MessageReceiverWithResponder* receiver) {
27 incoming_receiver_ = receiver; 28 incoming_receiver_ = receiver;
28 } 29 }
29 30
30 // Sets the error handler to receive notifications when an error is 31 // Sets the error handler to receive notifications when an error is
31 // encountered while reading from the pipe or waiting to read from the pipe. 32 // encountered while reading from the pipe or waiting to read from the pipe.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 MessageReceiverWithResponder* incoming_receiver_; 82 MessageReceiverWithResponder* incoming_receiver_;
82 ResponderMap responders_; 83 ResponderMap responders_;
83 uint64_t next_request_id_; 84 uint64_t next_request_id_;
84 bool testing_mode_; 85 bool testing_mode_;
85 }; 86 };
86 87
87 } // namespace internal 88 } // namespace internal
88 } // namespace mojo 89 } // namespace mojo
89 90
90 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_ 91 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_ROUTER_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_ptr_internal.h ('k') | mojo/public/cpp/environment/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698