| OLD | NEW |
| 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_INTERFACE_PTR_INTERNAL_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_INTERNAL_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_INTERNAL_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_INTERNAL_H_ |
| 7 | 7 |
| 8 #include <assert.h> | 8 #include <assert.h> |
| 9 #include <stdio.h> | 9 #include <stdio.h> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 | 56 |
| 57 void set_client(typename Interface::Client* client) { | 57 void set_client(typename Interface::Client* client) { |
| 58 assert(proxy_); | 58 assert(proxy_); |
| 59 proxy_->stub.set_sink(client); | 59 proxy_->stub.set_sink(client); |
| 60 } | 60 } |
| 61 | 61 |
| 62 private: | 62 private: |
| 63 class ProxyWithStub : public Interface::Proxy_ { | 63 class ProxyWithStub : public Interface::Proxy_ { |
| 64 public: | 64 public: |
| 65 explicit ProxyWithStub(MessageReceiver* receiver) | 65 explicit ProxyWithStub(MessageReceiverWithResponder* receiver) |
| 66 : Interface::Proxy_(receiver) { | 66 : Interface::Proxy_(receiver) { |
| 67 } | 67 } |
| 68 typename Interface::Client::Stub_ stub; | 68 typename Interface::Client::Stub_ stub; |
| 69 private: | 69 private: |
| 70 MOJO_DISALLOW_COPY_AND_ASSIGN(ProxyWithStub); | 70 MOJO_DISALLOW_COPY_AND_ASSIGN(ProxyWithStub); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 ProxyWithStub* proxy_; | 73 ProxyWithStub* proxy_; |
| 74 Router* router_; | 74 Router* router_; |
| 75 | 75 |
| 76 MOJO_DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); | 76 MOJO_DISALLOW_COPY_AND_ASSIGN(InterfacePtrState); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace internal | 79 } // namespace internal |
| 80 } // namespace mojo | 80 } // namespace mojo |
| 81 | 81 |
| 82 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_INTERNAL_H_ | 82 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_INTERFACE_PTR_INTERNAL_H_ |
| OLD | NEW |