Chromium Code Reviews| 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..1cf4a08737341486a56086131624e47ebf91c501 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 ExportedServiceRegistry; |
| 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; |
| + // |registry| is an object that the delegate can add services to to expose |
|
sky
2014/07/31 21:14:11
Update your comment, registry and remote_services
|
| + // to the embedder. |remote_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 |remote_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, |
| + ExportedServiceRegistry* exported_services, |
| + scoped_ptr<ServiceProvider> imported_services) {} |
| // Called when a connection to the view manager service is closed. |
| // |view_manager| is not valid after this function returns. |