1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "mojo/shell/connect_to_application_params.h"
7 #include "mojo/shell/application_instance.h"
12 ConnectToApplicationParams::ConnectToApplicationParams() {}
14 ConnectToApplicationParams::~ConnectToApplicationParams() {}
16 void ConnectToApplicationParams::SetSource(ApplicationInstance
* source
) {
22 source_
= source
->identity();
25 void ConnectToApplicationParams::SetTarget(const Identity
& target
) {
27 target_url_request_
= URLRequest::New();
28 target_url_request_
->url
= target_
.url().spec();
31 void ConnectToApplicationParams::SetTargetURL(const GURL
& target_url
) {
32 target_
= Identity(target_url
, target_
.qualifier(), target_
.filter());
33 target_url_request_
= URLRequest::New();
34 target_url_request_
->url
= target_
.url().spec();
37 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request
) {
38 Identity target
= request
? Identity(GURL(request
->url
), target_
.qualifier(),
41 SetTargetURLRequest(request
.Pass(), target
);
44 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request
,
45 const Identity
& target
) {
46 target_url_request_
= request
.Pass();