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

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

Issue 299833008: Move AcceptWithResponder() out of the MessageReceiver interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/router.h ('k') | mojo/public/cpp/bindings/message.h » ('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 #include "mojo/public/cpp/bindings/lib/router.h" 5 #include "mojo/public/cpp/bindings/lib/router.h"
6 6
7 namespace mojo { 7 namespace mojo {
8 namespace internal { 8 namespace internal {
9 9
10 // ---------------------------------------------------------------------------- 10 // ----------------------------------------------------------------------------
(...skipping 12 matching lines...) Expand all
23 23
24 bool result = false; 24 bool result = false;
25 25
26 Router* router = router_.value(); 26 Router* router = router_.value();
27 if (router) 27 if (router)
28 result = router->Accept(message); 28 result = router->Accept(message);
29 29
30 return result; 30 return result;
31 } 31 }
32 32
33 virtual bool AcceptWithResponder(Message* message,
34 MessageReceiver* responder) MOJO_OVERRIDE {
35 assert(false); // not reached!
36 return false;
37 }
38
39 private: 33 private:
40 SharedData<Router*> router_; 34 SharedData<Router*> router_;
41 }; 35 };
42 36
43 // ---------------------------------------------------------------------------- 37 // ----------------------------------------------------------------------------
44 38
45 Router::HandleIncomingMessageThunk::HandleIncomingMessageThunk(Router* router) 39 Router::HandleIncomingMessageThunk::HandleIncomingMessageThunk(Router* router)
46 : router_(router) { 40 : router_(router) {
47 } 41 }
48 42
49 Router::HandleIncomingMessageThunk::~HandleIncomingMessageThunk() { 43 Router::HandleIncomingMessageThunk::~HandleIncomingMessageThunk() {
50 } 44 }
51 45
52 bool Router::HandleIncomingMessageThunk::Accept(Message* message) { 46 bool Router::HandleIncomingMessageThunk::Accept(Message* message) {
53 return router_->HandleIncomingMessage(message); 47 return router_->HandleIncomingMessage(message);
54 } 48 }
55 49
56 bool Router::HandleIncomingMessageThunk::AcceptWithResponder(
57 Message* message,
58 MessageReceiver* responder) {
59 assert(false); // not reached!
60 return false;
61 }
62
63 // ---------------------------------------------------------------------------- 50 // ----------------------------------------------------------------------------
64 51
65 Router::Router(ScopedMessagePipeHandle message_pipe, 52 Router::Router(ScopedMessagePipeHandle message_pipe,
66 FilterChain filters, 53 FilterChain filters,
67 MojoAsyncWaiter* waiter) 54 MojoAsyncWaiter* waiter)
68 : thunk_(this), 55 : thunk_(this),
69 filters_(filters.Pass()), 56 filters_(filters.Pass()),
70 connector_(message_pipe.Pass(), waiter), 57 connector_(message_pipe.Pass(), waiter),
71 weak_self_(this), 58 weak_self_(this),
72 incoming_receiver_(NULL), 59 incoming_receiver_(NULL),
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // OK to drop message on the floor. 125 // OK to drop message on the floor.
139 } 126 }
140 127
141 return false; 128 return false;
142 } 129 }
143 130
144 // ---------------------------------------------------------------------------- 131 // ----------------------------------------------------------------------------
145 132
146 } // namespace internal 133 } // namespace internal
147 } // namespace mojo 134 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/router.h ('k') | mojo/public/cpp/bindings/message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698