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

Unified Diff: mojo/shell/application_instance.h

Issue 1311353005: Adds a way to determine id of content handler that created app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke comment Created 5 years, 4 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/runner/shell_test_base.cc ('k') | mojo/shell/application_instance.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_instance.h
diff --git a/mojo/shell/application_instance.h b/mojo/shell/application_instance.h
index f50ab82113bb354afb54f2e45c4fb3a4864a6e8a..22b4cb14b3342e5d0a0be98f49f2d53cbde4043c 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 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;
@@ -40,7 +44,8 @@ class ApplicationInstance : public Shell {
const GURL& requestor_url,
InterfaceRequest<ServiceProvider> services,
ServiceProviderPtr exposed_services,
- const CapabilityFilter& filter);
+ const CapabilityFilter& filter,
+ const ConnectToApplicationCallback& callback);
// Returns the set of interfaces this application instance is allowed to see
// from an instance with |identity|.
@@ -49,13 +54,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 +90,7 @@ class ApplicationInstance : public Shell {
InterfaceRequest<ServiceProvider> services;
ServiceProviderPtr exposed_services;
CapabilityFilter filter;
+ ConnectToApplicationCallback connect_callback;
};
ApplicationManager* const manager_;
@@ -84,6 +98,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_;
« no previous file with comments | « mojo/runner/shell_test_base.cc ('k') | mojo/shell/application_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698