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

Unified Diff: mojo/ui/view_provider_app.h

Issue 1679023006: Reify view ownership as a message pipe. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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/ui/gl_view.cc ('k') | mojo/ui/view_provider_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/ui/view_provider_app.h
diff --git a/mojo/ui/view_provider_app.h b/mojo/ui/view_provider_app.h
index 07668c6de304533b2a7062838b095899c3a8dda2..f5c4b355659bf5ded0df6f65d4ed9fef1de998a9 100644
--- a/mojo/ui/view_provider_app.h
+++ b/mojo/ui/view_provider_app.h
@@ -42,12 +42,19 @@ class ViewProviderApp : public mojo::ApplicationDelegate,
//
// The |view_provider_url| is the connection URL of the view provider request.
//
- // Returns true if successful, false if the view could not be created.
- virtual bool CreateView(
+ // The |view_owner_request| should be attached to the newly created view
+ // and closed or left pending if the view could not be created.
+ //
+ // The |services| parameter is used to receive services from the view
+ // on behalf of the caller.
+ //
+ // The |exposed_services| parameters is used to provide services to
+ // the view from the caller.
+ virtual void CreateView(
const std::string& view_provider_url,
+ mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services,
- const mojo::ui::ViewProvider::CreateViewCallback& callback) = 0;
+ mojo::ServiceProviderPtr exposed_services) = 0;
private:
class DelegatingViewProvider;
@@ -56,11 +63,12 @@ class ViewProviderApp : public mojo::ApplicationDelegate,
void Create(mojo::ApplicationConnection* connection,
mojo::InterfaceRequest<mojo::ui::ViewProvider> request) override;
- void CreateView(DelegatingViewProvider* provider,
- const std::string& view_provider_url,
- mojo::InterfaceRequest<mojo::ServiceProvider> services,
- mojo::ServiceProviderPtr exposed_services,
- const mojo::ui::ViewProvider::CreateViewCallback& callback);
+ void CreateView(
+ DelegatingViewProvider* provider,
+ const std::string& view_provider_url,
+ mojo::InterfaceRequest<mojo::ui::ViewOwner> view_owner_request,
+ mojo::InterfaceRequest<mojo::ServiceProvider> services,
+ mojo::ServiceProviderPtr exposed_services);
mojo::ApplicationImpl* app_impl_ = nullptr;
mojo::StrongBindingSet<mojo::ui::ViewProvider> bindings_;
« no previous file with comments | « mojo/ui/gl_view.cc ('k') | mojo/ui/view_provider_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698