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

Unified Diff: content/browser/mojo/mojo_shell_context.cc

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 | « content/browser/mojo/mojo_shell_context.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_shell_context.cc
diff --git a/content/browser/mojo/mojo_shell_context.cc b/content/browser/mojo/mojo_shell_context.cc
index aee1a2eb17d4b3fd87d5e4577420989fdf60ed2b..2f84ac2ee72db01d33ca918b6db313282be01a36 100644
--- a/content/browser/mojo/mojo_shell_context.cc
+++ b/content/browser/mojo/mojo_shell_context.cc
@@ -99,12 +99,13 @@ class MojoShellContext::Proxy {
const GURL& requestor_url,
mojo::InterfaceRequest<mojo::ServiceProvider> request,
mojo::ServiceProviderPtr exposed_services,
- const mojo::shell::CapabilityFilter& filter) {
+ const mojo::shell::CapabilityFilter& filter,
+ const mojo::Shell::ConnectToApplicationCallback& callback) {
if (task_runner_ == base::ThreadTaskRunnerHandle::Get()) {
if (shell_context_) {
shell_context_->ConnectToApplicationOnOwnThread(
- url, requestor_url, request.Pass(), exposed_services.Pass(),
- filter);
+ url, requestor_url, request.Pass(), exposed_services.Pass(), filter,
+ callback);
}
} else {
// |shell_context_| outlives the main MessageLoop, so it's safe for it to
@@ -114,7 +115,7 @@ class MojoShellContext::Proxy {
base::Bind(&MojoShellContext::ConnectToApplicationOnOwnThread,
base::Unretained(shell_context_), url, requestor_url,
base::Passed(&request), base::Passed(&exposed_services),
- filter));
+ filter, callback));
}
}
@@ -186,9 +187,10 @@ void MojoShellContext::ConnectToApplication(
const GURL& requestor_url,
mojo::InterfaceRequest<mojo::ServiceProvider> request,
mojo::ServiceProviderPtr exposed_services,
- const mojo::shell::CapabilityFilter& filter) {
+ const mojo::shell::CapabilityFilter& filter,
+ const mojo::Shell::ConnectToApplicationCallback& callback) {
proxy_.Get()->ConnectToApplication(url, requestor_url, request.Pass(),
- exposed_services.Pass(), filter);
+ exposed_services.Pass(), filter, callback);
}
void MojoShellContext::ConnectToApplicationOnOwnThread(
@@ -196,12 +198,13 @@ void MojoShellContext::ConnectToApplicationOnOwnThread(
const GURL& requestor_url,
mojo::InterfaceRequest<mojo::ServiceProvider> request,
mojo::ServiceProviderPtr exposed_services,
- const mojo::shell::CapabilityFilter& filter) {
+ const mojo::shell::CapabilityFilter& filter,
+ const mojo::Shell::ConnectToApplicationCallback& callback) {
mojo::URLRequestPtr url_request = mojo::URLRequest::New();
url_request->url = mojo::String::From(url);
application_manager_->ConnectToApplication(
nullptr, url_request.Pass(), std::string(), requestor_url, request.Pass(),
- exposed_services.Pass(), filter, base::Bind(&base::DoNothing));
+ exposed_services.Pass(), filter, base::Bind(&base::DoNothing), callback);
}
GURL MojoShellContext::ResolveMappings(const GURL& url) {
« no previous file with comments | « content/browser/mojo/mojo_shell_context.h ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698