| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/shell/connect_to_application_params.h" | 5 #include "mojo/shell/connect_to_application_params.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "mojo/shell/application_instance.h" | 9 #include "mojo/shell/application_instance.h" |
| 8 | 10 |
| 9 namespace mojo { | 11 namespace mojo { |
| 10 namespace shell { | 12 namespace shell { |
| 11 | 13 |
| 12 ConnectToApplicationParams::ConnectToApplicationParams() {} | 14 ConnectToApplicationParams::ConnectToApplicationParams() {} |
| 13 | 15 |
| 14 ConnectToApplicationParams::~ConnectToApplicationParams() {} | 16 ConnectToApplicationParams::~ConnectToApplicationParams() {} |
| 15 | 17 |
| 16 void ConnectToApplicationParams::SetSource(ApplicationInstance* source) { | 18 void ConnectToApplicationParams::SetSource(ApplicationInstance* source) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 31 void ConnectToApplicationParams::SetTargetURL(const GURL& target_url) { | 33 void ConnectToApplicationParams::SetTargetURL(const GURL& target_url) { |
| 32 target_ = Identity(target_url, target_.qualifier(), target_.filter()); | 34 target_ = Identity(target_url, target_.qualifier(), target_.filter()); |
| 33 target_url_request_ = URLRequest::New(); | 35 target_url_request_ = URLRequest::New(); |
| 34 target_url_request_->url = target_.url().spec(); | 36 target_url_request_->url = target_.url().spec(); |
| 35 } | 37 } |
| 36 | 38 |
| 37 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request) { | 39 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request) { |
| 38 Identity target = request ? Identity(GURL(request->url), target_.qualifier(), | 40 Identity target = request ? Identity(GURL(request->url), target_.qualifier(), |
| 39 target_.filter()) | 41 target_.filter()) |
| 40 : Identity(); | 42 : Identity(); |
| 41 SetTargetURLRequest(request.Pass(), target); | 43 SetTargetURLRequest(std::move(request), target); |
| 42 } | 44 } |
| 43 | 45 |
| 44 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request, | 46 void ConnectToApplicationParams::SetTargetURLRequest(URLRequestPtr request, |
| 45 const Identity& target) { | 47 const Identity& target) { |
| 46 target_url_request_ = request.Pass(); | 48 target_url_request_ = std::move(request); |
| 47 target_ = target; | 49 target_ = target; |
| 48 } | 50 } |
| 49 | 51 |
| 50 } // namespace shell | 52 } // namespace shell |
| 51 } // namespace mojo | 53 } // namespace mojo |
| OLD | NEW |