Chromium Code Reviews| 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" | |
| 10 | 11 |
| 11 namespace content { | 12 namespace content { |
| 12 | 13 |
| 13 PresentationConnectionClient::PresentationConnectionClient( | 14 PresentationConnectionClient::PresentationConnectionClient( |
| 14 blink::mojom::PresentationSessionInfoPtr session_info) | 15 blink::mojom::PresentationSessionInfoPtr session_info) |
| 15 : url_(session_info->url), | 16 : PresentationConnectionClient(std::move(session_info), nullptr) {} |
|
mark a. foltz
2016/11/16 01:16:39
If this object is taking ownership of |session_inf
zhaobin
2016/11/23 22:52:29
Done.
| |
| 16 id_(blink::WebString::fromUTF8(session_info->id)) {} | |
| 17 | 17 |
| 18 PresentationConnectionClient::PresentationConnectionClient( | 18 PresentationConnectionClient::PresentationConnectionClient( |
| 19 const GURL& url, | 19 blink::mojom::PresentationSessionInfoPtr session_info, |
| 20 const mojo::String& id) | 20 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy) |
| 21 : url_(url), | 21 : url_(session_info->url), |
| 22 id_(blink::WebString::fromUTF8(id)) {} | 22 id_(blink::WebString::fromUTF8(session_info->id)), |
| 23 proxy_(std::move(proxy)) {} | |
| 23 | 24 |
| 24 PresentationConnectionClient::~PresentationConnectionClient() { | 25 PresentationConnectionClient::~PresentationConnectionClient() { |
| 25 } | 26 } |
| 26 | 27 |
| 27 blink::WebURL PresentationConnectionClient::getUrl() { | 28 blink::WebURL PresentationConnectionClient::getUrl() { |
| 28 return url_; | 29 return url_; |
| 29 } | 30 } |
| 30 | 31 |
| 31 blink::WebString PresentationConnectionClient::getId() { | 32 blink::WebString PresentationConnectionClient::getId() { |
| 32 return id_; | 33 return id_; |
| 33 } | 34 } |
| 34 | 35 |
| 36 std::unique_ptr<blink::WebPresentationConnectionProxy> | |
| 37 PresentationConnectionClient::takeProxy() { | |
| 38 return std::move(proxy_); | |
| 39 } | |
| 40 | |
| 35 } // namespace content | 41 } // namespace content |
| OLD | NEW |