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

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

Issue 2706463002: [Presentation API] Mojo typemap for content::PresentationConnectionMessage (Closed)
Patch Set: Remove TODO Created 3 years, 9 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 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 "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
10 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nConnectionProxy.h" 11 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nConnectionProxy.h"
11 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m ojom.h" 12 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m ojom.h"
12 13
13 namespace blink { 14 namespace blink {
14 class WebPresentationConnection; 15 class WebPresentationConnection;
15 } // namespace blink 16 } // namespace blink
16 17
17 namespace content { 18 namespace content {
18 19
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // presentations. 69 // presentations.
69 class CONTENT_EXPORT PresentationConnectionProxy 70 class CONTENT_EXPORT PresentationConnectionProxy
70 : public NON_EXPORTED_BASE(blink::WebPresentationConnectionProxy), 71 : public NON_EXPORTED_BASE(blink::WebPresentationConnectionProxy),
71 public NON_EXPORTED_BASE(blink::mojom::PresentationConnection) { 72 public NON_EXPORTED_BASE(blink::mojom::PresentationConnection) {
72 public: 73 public:
73 using OnMessageCallback = base::Callback<void(bool)>; 74 using OnMessageCallback = base::Callback<void(bool)>;
74 75
75 ~PresentationConnectionProxy() override; 76 ~PresentationConnectionProxy() override;
76 77
77 virtual void SendConnectionMessage( 78 virtual void SendConnectionMessage(
78 blink::mojom::ConnectionMessagePtr connection_message, 79 const PresentationConnectionMessage& message,
79 const OnMessageCallback& callback) const; 80 const OnMessageCallback& callback) const;
80 81
81 // blink::mojom::PresentationConnection implementation 82 // blink::mojom::PresentationConnection implementation
82 void OnMessage(blink::mojom::ConnectionMessagePtr message, 83 void OnMessage(const PresentationConnectionMessage& message,
83 const OnMessageCallback& callback) override; 84 const OnMessageCallback& callback) override;
84 void DidChangeState(content::PresentationConnectionState state) override; 85 void DidChangeState(content::PresentationConnectionState state) override;
85 86
86 protected: 87 protected:
87 explicit PresentationConnectionProxy( 88 explicit PresentationConnectionProxy(
88 blink::WebPresentationConnection* source_connection); 89 blink::WebPresentationConnection* source_connection);
89 mojo::Binding<blink::mojom::PresentationConnection> binding_; 90 mojo::Binding<blink::mojom::PresentationConnection> binding_;
90 mojo::InterfacePtr<blink::mojom::PresentationConnection> 91 mojo::InterfacePtr<blink::mojom::PresentationConnection>
91 target_connection_ptr_; 92 target_connection_ptr_;
92 93
(...skipping 28 matching lines...) Expand all
121 122
122 // Sets |target_connection_ptr_| to |controller_connection_ptr|. Should be 123 // Sets |target_connection_ptr_| to |controller_connection_ptr|. Should be
123 // called only once. 124 // called only once.
124 void BindControllerConnection( 125 void BindControllerConnection(
125 blink::mojom::PresentationConnectionPtr controller_connection_ptr); 126 blink::mojom::PresentationConnectionPtr controller_connection_ptr);
126 }; 127 };
127 128
128 } // namespace content 129 } // namespace content
129 130
130 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_ 131 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_CONNECTION_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698