| 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_INTERFACE_PTR_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ |
| 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include "base/logging.h" | 10 #include "base/logging.h" |
| 9 #include "base/macros.h" | 11 #include "base/macros.h" |
| 10 #include "mojo/public/cpp/bindings/callback.h" | 12 #include "mojo/public/cpp/bindings/callback.h" |
| 11 #include "mojo/public/cpp/bindings/interface_ptr_info.h" | 13 #include "mojo/public/cpp/bindings/interface_ptr_info.h" |
| 12 #include "mojo/public/cpp/bindings/lib/interface_ptr_state.h" | 14 #include "mojo/public/cpp/bindings/lib/interface_ptr_state.h" |
| 13 #include "mojo/public/cpp/environment/environment.h" | 15 #include "mojo/public/cpp/environment/environment.h" |
| 14 | 16 |
| 15 namespace mojo { | 17 namespace mojo { |
| 16 | 18 |
| 17 class AssociatedGroup; | 19 class AssociatedGroup; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) { | 219 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) { |
| 218 InterfacePtr<Interface> ptr; | 220 InterfacePtr<Interface> ptr; |
| 219 if (info.is_valid()) | 221 if (info.is_valid()) |
| 220 ptr.Bind(info.Pass(), waiter); | 222 ptr.Bind(info.Pass(), waiter); |
| 221 return ptr.Pass(); | 223 return ptr.Pass(); |
| 222 } | 224 } |
| 223 | 225 |
| 224 } // namespace mojo | 226 } // namespace mojo |
| 225 | 227 |
| 226 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ | 228 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ |
| OLD | NEW |