Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |