Chromium Code Reviews| Index: mojo/public/cpp/application/lazy_interface_ptr.h |
| diff --git a/mojo/public/cpp/application/lazy_interface_ptr.h b/mojo/public/cpp/application/lazy_interface_ptr.h |
| index 62d0ae9f6ee32d414ec63ce69f9b4362b5dd682b..00de7525c6bb877b1d46fe520fbe2623dac8c45d 100644 |
| --- a/mojo/public/cpp/application/lazy_interface_ptr.h |
| +++ b/mojo/public/cpp/application/lazy_interface_ptr.h |
| @@ -15,10 +15,17 @@ namespace mojo { |
| template<typename Interface> |
| class LazyInterfacePtr : InterfacePtr<Interface> { |
| public: |
| + LazyInterfacePtr() : service_provider_(NULL) {} |
| + |
| LazyInterfacePtr(ServiceProvider* service_provider) |
| : service_provider_(service_provider) { |
| } |
| + void set_service_provider(ServiceProvider* service_provider) { |
|
darin (slow to review)
2014/09/04 23:22:18
you probably want to make sure InterfacePtr<Interf
Aaron Boodman
2014/09/05 04:22:34
I decided to just reset the InterfaceProvider when
|
| + DCHECK(!service_provider_); |
| + service_provider_ = service_provider; |
| + } |
| + |
| Interface* get() const { |
| if (!InterfacePtr<Interface>::get()) { |
| mojo::ConnectToService<Interface>( |