| 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 "content/public/common/presentation_connection_message.h" | 9 #include "content/public/common/presentation_connection_message.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(PresentationConnectionMessage message, | 82 void OnMessage(PresentationConnectionMessage 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; | 85 void OnClose() override; |
| 86 | 86 |
| 87 // blink::WebPresentationConnectionProxy implementation. | 87 // blink::WebPresentationConnectionProxy implementation. |
| 88 void Close() const override; | 88 void Close() const override; |
| 89 void NotifyTargetConnection( |
| 90 blink::WebPresentationConnectionState state) override; |
| 89 | 91 |
| 90 protected: | 92 protected: |
| 91 explicit PresentationConnectionProxy( | 93 explicit PresentationConnectionProxy( |
| 92 blink::WebPresentationConnection* source_connection); | 94 blink::WebPresentationConnection* source_connection); |
| 93 mojo::Binding<blink::mojom::PresentationConnection> binding_; | 95 mojo::Binding<blink::mojom::PresentationConnection> binding_; |
| 94 mojo::InterfacePtr<blink::mojom::PresentationConnection> | 96 mojo::InterfacePtr<blink::mojom::PresentationConnection> |
| 95 target_connection_ptr_; | 97 target_connection_ptr_; |
| 96 | 98 |
| 97 private: | 99 private: |
| 98 // Raw pointer to Blink connection object owning this proxy object. Does not | 100 // Raw pointer to Blink connection object owning this proxy object. Does not |
| (...skipping 26 matching lines...) Expand all Loading... |
| 125 | 127 |
| 126 // Sets |target_connection_ptr_| to |controller_connection_ptr|. Should be | 128 // Sets |target_connection_ptr_| to |controller_connection_ptr|. Should be |
| 127 // called only once. | 129 // called only once. |
| 128 void BindControllerConnection( | 130 void BindControllerConnection( |
| 129 blink::mojom::PresentationConnectionPtr controller_connection_ptr); | 131 blink::mojom::PresentationConnectionPtr controller_connection_ptr); |
| 130 }; | 132 }; |
| 131 | 133 |
| 132 } // namespace content | 134 } // namespace content |
| 133 | 135 |
| 134 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_ | 136 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_ |
| OLD | NEW |