Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: content/renderer/presentation/presentation_connection_client.cc

Issue 2471263003: [Presentation API] (4th)(1-UA blink side) Add WebPresentationConnection and WebPresentationConnecti… (Closed)
Patch Set: rebase and resolve code review comments from haraken Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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(session_info->url,
16 id_(blink::WebString::fromUTF8(session_info->id)) {} 17 session_info->id,
18 nullptr) {}
17 19
18 PresentationConnectionClient::PresentationConnectionClient( 20 PresentationConnectionClient::PresentationConnectionClient(
19 const GURL& url, 21 const GURL& url,
20 const mojo::String& id) 22 const mojo::String& id,
23 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy)
21 : url_(url), 24 : url_(url),
22 id_(blink::WebString::fromUTF8(id)) {} 25 id_(blink::WebString::fromUTF8(id)),
26 proxy_(std::move(proxy)) {}
23 27
24 PresentationConnectionClient::~PresentationConnectionClient() { 28 PresentationConnectionClient::~PresentationConnectionClient() {
25 } 29 }
26 30
27 blink::WebURL PresentationConnectionClient::getUrl() { 31 blink::WebURL PresentationConnectionClient::getUrl() {
28 return url_; 32 return url_;
29 } 33 }
30 34
31 blink::WebString PresentationConnectionClient::getId() { 35 blink::WebString PresentationConnectionClient::getId() {
32 return id_; 36 return id_;
33 } 37 }
34 38
39 std::unique_ptr<blink::WebPresentationConnectionProxy>
40 PresentationConnectionClient::takeProxy() {
41 return std::move(proxy_);
42 }
43
35 } // namespace content 44 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698