OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_CONNECTION_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_ |
6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_ | 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "mojo/public/cpp/bindings/binding.h" | 9 #include "mojo/public/cpp/bindings/binding.h" |
10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nConnectionProxy.h" | 10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio
nConnectionProxy.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 ~PresentationConnectionProxy() override; | 75 ~PresentationConnectionProxy() override; |
76 | 76 |
77 virtual void SendConnectionMessage( | 77 virtual void SendConnectionMessage( |
78 blink::mojom::ConnectionMessagePtr connection_message, | 78 blink::mojom::ConnectionMessagePtr connection_message, |
79 const OnMessageCallback& callback) const; | 79 const OnMessageCallback& callback) const; |
80 | 80 |
81 // blink::mojom::PresentationConnection implementation | 81 // blink::mojom::PresentationConnection implementation |
82 void OnMessage(blink::mojom::ConnectionMessagePtr message, | 82 void OnMessage(blink::mojom::ConnectionMessagePtr message, |
83 const OnMessageCallback& callback) override; | 83 const OnMessageCallback& callback) override; |
84 void DidChangeState(content::PresentationConnectionState state) override; | 84 void DidChangeState(content::PresentationConnectionState state) override; |
| 85 void OnClose() override; |
| 86 |
| 87 // blink::WebPresentationConnectionProxy implementation. |
| 88 void close() const override; |
85 | 89 |
86 protected: | 90 protected: |
87 explicit PresentationConnectionProxy( | 91 explicit PresentationConnectionProxy( |
88 blink::WebPresentationConnection* source_connection); | 92 blink::WebPresentationConnection* source_connection); |
89 mojo::Binding<blink::mojom::PresentationConnection> binding_; | 93 mojo::Binding<blink::mojom::PresentationConnection> binding_; |
90 mojo::InterfacePtr<blink::mojom::PresentationConnection> | 94 mojo::InterfacePtr<blink::mojom::PresentationConnection> |
91 target_connection_ptr_; | 95 target_connection_ptr_; |
92 | 96 |
93 private: | 97 private: |
94 // Raw pointer to Blink connection object owning this proxy object. Does not | 98 // Raw pointer to Blink connection object owning this proxy object. Does not |
(...skipping 26 matching lines...) Expand all Loading... |
121 | 125 |
122 // Sets |target_connection_ptr_| to |controller_connection_ptr|. Should be | 126 // Sets |target_connection_ptr_| to |controller_connection_ptr|. Should be |
123 // called only once. | 127 // called only once. |
124 void BindControllerConnection( | 128 void BindControllerConnection( |
125 blink::mojom::PresentationConnectionPtr controller_connection_ptr); | 129 blink::mojom::PresentationConnectionPtr controller_connection_ptr); |
126 }; | 130 }; |
127 | 131 |
128 } // namespace content | 132 } // namespace content |
129 | 133 |
130 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_ | 134 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_ |
OLD | NEW |