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

Side by Side Diff: content/renderer/presentation/renderer_presentation_connection.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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_PRESENTATION_RENDERER_PRESENTATION_CONNECTION_H_
6 #define CONTENT_RENDERER_PRESENTATION_RENDERER_PRESENTATION_CONNECTION_H_
7
8 #include "base/callback.h"
9 #include "mojo/public/cpp/bindings/binding.h"
10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nConnection.h"
11 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nConnectionProxy.h"
12 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m ojom.h"
13
14 namespace content {
15
mark a. foltz 2016/10/10 18:28:52 Can you add a class-level comment describing what
zhaobin 2016/10/12 02:27:34 Done.
16 class RendererPresentationConnection
mark a. foltz 2016/10/10 18:28:52 There is already a PresentationConnection object i
zhaobin 2016/10/12 02:27:34 Done.
17 : public blink::WebPresentationConnectionProxy,
18 public NON_EXPORTED_BASE(blink::mojom::PresentationConnection) {
19 public:
20 RendererPresentationConnection();
21 ~RendererPresentationConnection() override;
22
23 blink::mojom::PresentationConnectionPtr Bind();
24
25 // WebPresentationConnectionProxy Implementation
26 void SetConnection(blink::WebPresentationConnection* connection) override;
mark a. foltz 2016/10/10 18:28:52 Maybe SetSourceConnection?
zhaobin 2016/10/12 02:27:34 Done.
27 void SendString(const blink::WebString& message) override;
28 void SendArrayBuffer(const uint8_t* data, size_t length) override;
29
30 // blink::mojom::PresentationConnection implementation
31 void SetTargetConnection(
32 blink::mojom::PresentationConnectionPtr connection) override;
33 void OnSessionMessageReceived(
mark a. foltz 2016/10/10 18:28:52 OnConnectionMessageReceived
zhaobin 2016/10/12 02:27:34 Done.
34 blink::mojom::SessionMessagePtr message) override;
35
36 private:
37 mojo::Binding<blink::mojom::PresentationConnection> binding_;
38 blink::mojom::PresentationConnectionPtr target_connection_;
39 blink::WebPresentationConnection* connection_;
mark a. foltz 2016/10/10 18:28:52 source_connection_
zhaobin 2016/10/12 02:27:34 Done.
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_RENDERER_PRESENTATION_RENDERER_PRESENTATION_CONNECTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698