Index: mojo/services/public/cpp/view_manager/view_manager_delegate.h |
diff --git a/mojo/services/public/cpp/view_manager/view_manager_delegate.h b/mojo/services/public/cpp/view_manager/view_manager_delegate.h |
index 3b9d073d183520d09756db28e948319f854158ee..a18a46c09a8f989fe3b65cfe3d2232555f0092f2 100644 |
--- a/mojo/services/public/cpp/view_manager/view_manager_delegate.h |
+++ b/mojo/services/public/cpp/view_manager/view_manager_delegate.h |
@@ -5,8 +5,12 @@ |
#ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_DELEGATE_H_ |
#define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_DELEGATE_H_ |
+#include "base/memory/scoped_ptr.h" |
+#include "mojo/public/interfaces/application/service_provider.mojom.h" |
+ |
namespace mojo { |
+class ServiceProviderImpl; |
class Node; |
class ViewManager; |
@@ -21,7 +25,16 @@ class ViewManagerDelegate { |
// instance of |view_manager| only for every unique connection. See |
// the class description of ViewManager for some rules about when a new |
// connection is made. |
- virtual void OnEmbed(ViewManager* view_manager, Node* root) = 0; |
+ // |exported_services| is an object that the delegate can add services to to |
+ // expose to the embedder. |imported_services| exposes the services offered by |
+ // the embedder to the delegate. Note that if a different application is |
+ // subsequently embedded at |root|, the pipe(s) connecting |imported_services| |
+ // to the embedder and any services obtained from it are not broken and will |
+ // continue to be valid. |
+ virtual void OnEmbed(ViewManager* view_manager, |
+ Node* root, |
+ ServiceProviderImpl* exported_services, |
+ scoped_ptr<ServiceProvider> imported_services) {} |
darin (slow to review)
2014/08/07 16:53:03
you didn't want to force people to implement this?
|
// Called when a connection to the view manager service is closed. |
// |view_manager| is not valid after this function returns. |