| 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 "content/renderer/presentation/presentation_connection_client.h" | 5 #include "content/renderer/presentation/presentation_connection_client.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "third_party/WebKit/public/platform/WebString.h" | 8 #include "third_party/WebKit/public/platform/WebString.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 PresentationConnectionClient::PresentationConnectionClient( | 12 PresentationConnectionClient::PresentationConnectionClient( |
| 13 blink::mojom::PresentationSessionInfoPtr session_info) | 13 blink::mojom::PresentationSessionInfoPtr session_info) |
| 14 : url_(blink::WebString::fromUTF8(session_info->url)), | 14 : url_(blink::WebString::fromUTF8(session_info->url.spec())), |
| 15 id_(blink::WebString::fromUTF8(session_info->id)) {} | 15 id_(blink::WebString::fromUTF8(session_info->id)) {} |
| 16 | 16 |
| 17 PresentationConnectionClient::PresentationConnectionClient( | 17 PresentationConnectionClient::PresentationConnectionClient( |
| 18 const mojo::String& url, | 18 const GURL& url, |
| 19 const mojo::String& id) | 19 const mojo::String& id) |
| 20 : url_(blink::WebString::fromUTF8(url)), | 20 : url_(blink::WebString::fromUTF8(url.spec())), |
| 21 id_(blink::WebString::fromUTF8(id)) { | 21 id_(blink::WebString::fromUTF8(id)) {} |
| 22 } | |
| 23 | 22 |
| 24 PresentationConnectionClient::~PresentationConnectionClient() { | 23 PresentationConnectionClient::~PresentationConnectionClient() { |
| 25 } | 24 } |
| 26 | 25 |
| 27 blink::WebString PresentationConnectionClient::getUrl() { | 26 blink::WebString PresentationConnectionClient::getUrl() { |
| 28 return url_; | 27 return url_; |
| 29 } | 28 } |
| 30 | 29 |
| 31 blink::WebString PresentationConnectionClient::getId() { | 30 blink::WebString PresentationConnectionClient::getId() { |
| 32 return id_; | 31 return id_; |
| 33 } | 32 } |
| 34 | 33 |
| 35 } // namespace content | 34 } // namespace content |
| OLD | NEW |