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

Unified Diff: mojo/public/cpp/bindings/interface_impl.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/DEPS ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/interface_impl.h
diff --git a/mojo/public/cpp/bindings/interface_impl.h b/mojo/public/cpp/bindings/interface_impl.h
index 6e68aa78e0891e3bcdf9d241fa871f20953d6165..8ba5e7ffa4a2f110fce19dd26378b0fe98a8228e 100644
--- a/mojo/public/cpp/bindings/interface_impl.h
+++ b/mojo/public/cpp/bindings/interface_impl.h
@@ -7,6 +7,7 @@
#include "mojo/public/cpp/bindings/interface_request.h"
#include "mojo/public/cpp/bindings/lib/interface_impl_internal.h"
+#include "mojo/public/cpp/environment/environment.h"
#include "mojo/public/cpp/system/macros.h"
namespace mojo {
@@ -57,9 +58,10 @@ class InterfaceImpl : public internal::InterfaceImplBase<Interface> {
//
// Before returning, the instance's OnConnectionEstablished method is called.
template <typename Impl>
-Impl* BindToPipe(Impl* instance,
- ScopedMessagePipeHandle handle,
- const MojoAsyncWaiter* waiter = GetDefaultAsyncWaiter()) {
+Impl* BindToPipe(
+ Impl* instance,
+ ScopedMessagePipeHandle handle,
+ const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
instance->internal_state()->Bind(handle.Pass(), waiter);
return instance;
}
@@ -75,9 +77,10 @@ Impl* BindToPipe(Impl* instance,
//
// Before returning, the instance's OnConnectionEstablished method is called.
template <typename Impl, typename Interface>
-Impl* BindToProxy(Impl* instance,
- InterfacePtr<Interface>* ptr,
- const MojoAsyncWaiter* waiter = GetDefaultAsyncWaiter()) {
+Impl* BindToProxy(
+ Impl* instance,
+ InterfacePtr<Interface>* ptr,
+ const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
instance->internal_state()->BindProxy(ptr, waiter);
return instance;
}
@@ -94,9 +97,10 @@ Impl* BindToProxy(Impl* instance,
// Before returning, the instance will receive a SetClient call, providing it
// with a proxy to the client on the other end of the pipe.
template <typename Impl, typename Interface>
-Impl* BindToRequest(Impl* instance,
- InterfaceRequest<Interface>* request,
- const MojoAsyncWaiter* waiter = GetDefaultAsyncWaiter()) {
+Impl* BindToRequest(
+ Impl* instance,
+ InterfaceRequest<Interface>* request,
+ const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
return BindToPipe(instance, request->PassMessagePipe(), waiter);
}
« no previous file with comments | « mojo/public/cpp/bindings/DEPS ('k') | mojo/public/cpp/bindings/interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698