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

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

Issue 2379703002: [Presentation API] (alternative) 1-UA: send message between controller and receiver page (Closed)
Patch Set: merge with master Created 4 years, 1 month 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(std::move(session_info), nullptr) {}
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698