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

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

Issue 2379703002: [Presentation API] (alternative) 1-UA: send message between controller and receiver page (Closed)
Patch Set: resolve code review comments from Mark Created 4 years, 2 months 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 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_SESSION_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_SESSION_CLIENT_H_
6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_SESSION_CLIENT_H_ 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_SESSION_CLIENT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nConnectionClient.h" 10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nConnectionClient.h"
11 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m ojom.h" 11 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m ojom.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 // PresentationConnectionClient is passed to the Blink layer if presentation 16 // PresentationConnectionClient is passed to the Blink layer if presentation
17 // session has been created successfully. Owned by the callback. 17 // session has been created successfully. Owned by the callback.
18 class CONTENT_EXPORT PresentationConnectionClient 18 class CONTENT_EXPORT PresentationConnectionClient
19 : public NON_EXPORTED_BASE(blink::WebPresentationConnectionClient) { 19 : public NON_EXPORTED_BASE(blink::WebPresentationConnectionClient) {
20 public: 20 public:
21 explicit PresentationConnectionClient( 21 explicit PresentationConnectionClient(
22 blink::mojom::PresentationSessionInfoPtr session_info); 22 blink::mojom::PresentationSessionInfoPtr session_info);
23 explicit PresentationConnectionClient(const GURL& url, 23 PresentationConnectionClient(const GURL& url, const mojo::String& id);
imcheng 2016/11/01 17:20:30 do we actually still need this? This is only calle
zhaobin 2016/11/02 03:55:48 Done.
24 const mojo::String& id); 24 // Call this constructor to create PresentationConnectionClient for
imcheng 2016/11/01 17:20:30 I would word this as: Creates a PresentationConnec
imcheng 2016/11/01 17:20:30 nit: add extra line above comments
zhaobin 2016/11/02 03:55:47 Done.
zhaobin 2016/11/02 03:55:47 Done.
25 // 1-UA presentation.
26 // |session_info|: contains presentation ID and URL info
27 // |proxy|: Proxy to blink PresentationConnection object in current render
28 // process. Ownership is passed to this class.
29 PresentationConnectionClient(
30 blink::mojom::PresentationSessionInfoPtr session_info,
31 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy);
25 ~PresentationConnectionClient() override; 32 ~PresentationConnectionClient() override;
26 33
27 // WebPresentationConnectionClient implementation. 34 // WebPresentationConnectionClient implementation.
28 blink::WebURL getUrl() override; 35 blink::WebURL getUrl() override;
29 blink::WebString getId() override; 36 blink::WebString getId() override;
37 // Returns proxy passed into this class. It will transfer ownership of
imcheng 2016/11/01 17:20:30 nit: add extra line above comments
zhaobin 2016/11/02 03:55:48 Done.
38 // |proxy_| to calling object (PresentationConnection).
39 std::unique_ptr<blink::WebPresentationConnectionProxy> takeProxy() override;
30 40
31 private: 41 private:
32 blink::WebURL url_; 42 blink::WebURL url_;
33 blink::WebString id_; 43 blink::WebString id_;
44 std::unique_ptr<blink::WebPresentationConnectionProxy> proxy_;
34 }; 45 };
35 46
36 } // namespace content 47 } // namespace content
37 48
38 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_SESSION_CLIENT_H_ 49 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_SESSION_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698