| 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 #include "third_party/WebKit/public/platform/WebURL.h" | 9 #include "third_party/WebKit/public/platform/WebURL.h" |
| 10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nConnectionProxy.h" |
| 11 #include "url/gurl.h" |
| 10 | 12 |
| 11 namespace content { | 13 namespace content { |
| 12 | 14 |
| 13 PresentationConnectionClient::PresentationConnectionClient( | 15 PresentationConnectionClient::PresentationConnectionClient( |
| 14 blink::mojom::PresentationSessionInfoPtr session_info) | 16 blink::mojom::PresentationSessionInfoPtr session_info) |
| 15 : url_(session_info->url), | 17 : PresentationConnectionClient(session_info->url, |
| 16 id_(blink::WebString::fromUTF8(session_info->id)) {} | 18 session_info->id, |
| 19 nullptr) {} |
| 17 | 20 |
| 18 PresentationConnectionClient::PresentationConnectionClient( | 21 PresentationConnectionClient::PresentationConnectionClient( |
| 19 const GURL& url, | 22 const GURL& url, |
| 20 const mojo::String& id) | 23 const mojo::String& id, |
| 24 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy) |
| 21 : url_(url), | 25 : url_(url), |
| 22 id_(blink::WebString::fromUTF8(id)) {} | 26 id_(blink::WebString::fromUTF8(id)), |
| 27 proxy_(std::move(proxy)) {} |
| 23 | 28 |
| 24 PresentationConnectionClient::~PresentationConnectionClient() { | 29 PresentationConnectionClient::~PresentationConnectionClient() { |
| 25 } | 30 } |
| 26 | 31 |
| 27 blink::WebURL PresentationConnectionClient::getUrl() { | 32 blink::WebURL PresentationConnectionClient::getUrl() { |
| 28 return url_; | 33 return url_; |
| 29 } | 34 } |
| 30 | 35 |
| 31 blink::WebString PresentationConnectionClient::getId() { | 36 blink::WebString PresentationConnectionClient::getId() { |
| 32 return id_; | 37 return id_; |
| 33 } | 38 } |
| 34 | 39 |
| 40 std::unique_ptr<blink::WebPresentationConnectionProxy> |
| 41 PresentationConnectionClient::takeProxy() { |
| 42 return std::move(proxy_); |
| 43 } |
| 44 |
| 35 } // namespace content | 45 } // namespace content |
| OLD | NEW |