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

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

Issue 1307273004: Group ConnectToApplication-related info into a params struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | mojo/mojo_shell.gyp » ('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 3ed065fdd2d22551758de7706e38a14b2883c0fc..2817731da4426a5d1201b013c9091e1ee9c84142 100644
--- a/content/browser/mojo/mojo_shell_context.cc
+++ b/content/browser/mojo/mojo_shell_context.cc
@@ -17,8 +17,9 @@
#include "content/public/common/service_registry.h"
#include "mojo/application/public/cpp/application_delegate.h"
#include "mojo/common/url_type_converters.h"
-#include "mojo/services/network/public/interfaces/url_loader.mojom.h"
#include "mojo/shell/application_loader.h"
+#include "mojo/shell/connect_to_application_params.h"
+#include "mojo/shell/identity.h"
#include "mojo/shell/static_application_loader.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/string.h"
@@ -226,11 +227,17 @@ void MojoShellContext::ConnectToApplicationOnOwnThread(
mojo::ServiceProviderPtr exposed_services,
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), callback);
+ scoped_ptr<mojo::shell::ConnectToApplicationParams> params(
+ new mojo::shell::ConnectToApplicationParams);
+ params->set_originator_identity(mojo::shell::Identity(requestor_url));
+ params->set_originator_filter(mojo::shell::GetPermissiveCapabilityFilter());
+ params->SetURLInfo(url);
+ params->set_services(request.Pass());
+ params->set_exposed_services(exposed_services.Pass());
+ params->set_filter(filter);
+ params->set_on_application_end(base::Bind(&base::DoNothing));
+ params->set_connect_callback(callback);
+ application_manager_->ConnectToApplication(params.Pass());
}
GURL MojoShellContext::ResolveMappings(const GURL& url) {
« no previous file with comments | « no previous file | mojo/mojo_shell.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698