Chromium Code Reviews| Index: mojo/shell/application_instance.h |
| diff --git a/mojo/shell/application_instance.h b/mojo/shell/application_instance.h |
| index f50ab82113bb354afb54f2e45c4fb3a4864a6e8a..393ea0c25822ff1738dfe92eeb1fc2195cc760fa 100644 |
| --- a/mojo/shell/application_instance.h |
| +++ b/mojo/shell/application_instance.h |
| @@ -24,11 +24,15 @@ class ApplicationManager; |
| // shell's ApplicationManager. |
| class ApplicationInstance : public Shell { |
| public: |
| + // |requesting_content_handler_id| is the id of the content handler that |
| + // loaded this app. If the app was not loaded by a content handler the id |
| + // is ApplicationManager::kInvalidContentHandlerID. |
| ApplicationInstance(ApplicationPtr application, |
| ApplicationManager* manager, |
| const Identity& originator_identity, |
| const Identity& resolved_identity, |
| const CapabilityFilter& filter, |
| + uint32_t requesting_content_handler_id, |
| const base::Closure& on_application_end); |
| ~ApplicationInstance() override; |
| @@ -49,13 +53,21 @@ class ApplicationInstance : public Shell { |
| Application* application() { return application_.get(); } |
| const Identity& identity() const { return identity_; } |
| base::Closure on_application_end() const { return on_application_end_; } |
| + void set_requesting_content_handler_id(uint32_t id) { |
| + requesting_content_handler_id_ = id; |
| + } |
| + uint32_t requesting_content_handler_id() const { |
| + return requesting_content_handler_id_; |
| + } |
| private: |
| // Shell implementation: |
| - void ConnectToApplication(URLRequestPtr app_request, |
| - InterfaceRequest<ServiceProvider> services, |
| - ServiceProviderPtr exposed_services, |
| - CapabilityFilterPtr filter) override; |
| + void ConnectToApplication( |
| + URLRequestPtr app_request, |
| + InterfaceRequest<ServiceProvider> services, |
| + ServiceProviderPtr exposed_services, |
| + CapabilityFilterPtr filter, |
| + const ConnectToApplicationCallback& callback) override; |
| void QuitApplication() override; |
| void CallAcceptConnection(ApplicationInstance* originator, |
| @@ -77,6 +89,7 @@ class ApplicationInstance : public Shell { |
| InterfaceRequest<ServiceProvider> services; |
| ServiceProviderPtr exposed_services; |
| CapabilityFilter filter; |
| + Shell::ConnectToApplicationCallback connect_callback; |
|
Ben Goodger (Google)
2015/08/31 17:41:07
don't think you need the Shell:: here?
sky
2015/08/31 19:46:07
Done.
|
| }; |
| ApplicationManager* const manager_; |
| @@ -84,6 +97,7 @@ class ApplicationInstance : public Shell { |
| const Identity identity_; |
| const CapabilityFilter filter_; |
| const bool allow_any_application_; |
| + uint32_t requesting_content_handler_id_; |
| base::Closure on_application_end_; |
| ApplicationPtr application_; |
| Binding<Shell> binding_; |