OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "mojo/shell/connect_to_application_params.h" |
| 6 |
| 7 #include "mojo/shell/application_instance.h" |
| 8 |
| 9 namespace mojo { |
| 10 namespace shell { |
| 11 |
| 12 ConnectToApplicationParams::ConnectToApplicationParams() {} |
| 13 |
| 14 ConnectToApplicationParams::~ConnectToApplicationParams() {} |
| 15 |
| 16 void ConnectToApplicationParams::SetOriginatorInfo( |
| 17 ApplicationInstance* originator) { |
| 18 if (!originator) { |
| 19 originator_identity_ = Identity(); |
| 20 originator_filter_.clear(); |
| 21 return; |
| 22 } |
| 23 |
| 24 originator_identity_ = originator->identity(); |
| 25 originator_filter_ = originator->filter(); |
| 26 } |
| 27 |
| 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(); |
| 32 } |
| 33 |
| 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(); |
| 37 } |
| 38 |
| 39 } // namespace shell |
| 40 } // namespace mojo |
OLD | NEW |