Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / mojo / shell / connect_to_application_params.cc
blobf1f4f2605c45152ad01a723be9780317a8e7d678
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"
9 namespace mojo {
10 namespace shell {
12 ConnectToApplicationParams::ConnectToApplicationParams() {}
14 ConnectToApplicationParams::~ConnectToApplicationParams() {}
16 void ConnectToApplicationParams::SetOriginatorInfo(
17 ApplicationInstance* originator) {
18 if (!originator) {
19 originator_identity_ = Identity();
20 originator_filter_.clear();
21 return;
24 originator_identity_ = originator->identity();
25 originator_filter_ = originator->filter();
28 void ConnectToApplicationParams::SetURLInfo(const GURL& app_url) {
29 app_url_ = app_url;
30 app_url_request_ = URLRequest::New();
31 app_url_request_->url = app_url_.spec();
34 void ConnectToApplicationParams::SetURLInfo(URLRequestPtr app_url_request) {
35 app_url_request_ = app_url_request.Pass();
36 app_url_ = app_url_request_ ? GURL(app_url_request_->url) : GURL();
39 } // namespace shell
40 } // namespace mojo