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

Unified Diff: mojo/public/cpp/application/lazy_interface_ptr.h

Issue 537843002: Expose NavigatorHost via Embed() rather than globally. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@viewman3
Patch Set: git cl format Created 6 years, 3 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
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>(

Powered by Google App Engine
This is Rietveld 408576698