Index: content/renderer/presentation/presentation_connection_client.cc |
diff --git a/content/renderer/presentation/presentation_connection_client.cc b/content/renderer/presentation/presentation_connection_client.cc |
index 145e08db32eae6ee210458173ec1056bca86b954..96d4e1e4193de7be4979a6b190d9a75fe49a9fa7 100644 |
--- a/content/renderer/presentation/presentation_connection_client.cc |
+++ b/content/renderer/presentation/presentation_connection_client.cc |
@@ -7,19 +7,29 @@ |
#include "base/logging.h" |
#include "third_party/WebKit/public/platform/WebString.h" |
#include "third_party/WebKit/public/platform/WebURL.h" |
+#include "third_party/WebKit/public/platform/modules/presentation/WebPresentationConnectionProxy.h" |
namespace content { |
PresentationConnectionClient::PresentationConnectionClient( |
blink::mojom::PresentationSessionInfoPtr session_info) |
: url_(session_info->url), |
- id_(blink::WebString::fromUTF8(session_info->id)) {} |
+ id_(blink::WebString::fromUTF8(session_info->id)), |
+ proxy_(nullptr) {} |
imcheng
2016/11/01 17:20:30
Can you see if you can use delegating constructors
zhaobin
2016/11/02 03:55:47
Done.
|
PresentationConnectionClient::PresentationConnectionClient( |
const GURL& url, |
const mojo::String& id) |
- : url_(url), |
- id_(blink::WebString::fromUTF8(id)) {} |
+ : url_(url), id_(blink::WebString::fromUTF8(id)), proxy_(nullptr) {} |
+ |
+PresentationConnectionClient::PresentationConnectionClient( |
+ blink::mojom::PresentationSessionInfoPtr session_info, |
+ std::unique_ptr<blink::WebPresentationConnectionProxy> proxy) |
+ : url_(session_info->url), |
+ id_(blink::WebString::fromUTF8(session_info->id)) { |
+ if (proxy) |
imcheng
2016/11/01 17:20:30
It doesn't look like this check is needed?
zhaobin
2016/11/02 03:55:47
Done.
|
+ proxy_ = std::move(proxy); |
+} |
PresentationConnectionClient::~PresentationConnectionClient() { |
} |
@@ -32,4 +42,9 @@ blink::WebString PresentationConnectionClient::getId() { |
return id_; |
} |
+std::unique_ptr<blink::WebPresentationConnectionProxy> |
+PresentationConnectionClient::takeProxy() { |
+ return std::move(proxy_); |
+} |
+ |
} // namespace content |