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

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

Issue 2562603002: Updates SessionMessage to ConnectionMessage. (Closed)
Patch Set: More edits to test. Created 4 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 6 #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <memory> 12 #include <memory>
13 #include <queue> 13 #include <queue>
14 #include <set>
15 #include <string>
16 #include <vector>
14 17
15 #include "base/compiler_specific.h" 18 #include "base/compiler_specific.h"
16 #include "base/id_map.h" 19 #include "base/id_map.h"
17 #include "base/macros.h" 20 #include "base/macros.h"
18 #include "content/common/content_export.h" 21 #include "content/common/content_export.h"
19 #include "content/public/renderer/render_frame_observer.h" 22 #include "content/public/renderer/render_frame_observer.h"
20 #include "mojo/public/cpp/bindings/binding.h" 23 #include "mojo/public/cpp/bindings/binding.h"
21 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nClient.h" 24 #include "third_party/WebKit/public/platform/modules/presentation/WebPresentatio nClient.h"
22 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m ojom.h" 25 #include "third_party/WebKit/public/platform/modules/presentation/presentation.m ojom.h"
23 #include "url/gurl.h" 26 #include "url/gurl.h"
(...skipping 15 matching lines...) Expand all
39 : public RenderFrameObserver, 42 : public RenderFrameObserver,
40 public NON_EXPORTED_BASE(blink::WebPresentationClient), 43 public NON_EXPORTED_BASE(blink::WebPresentationClient),
41 public NON_EXPORTED_BASE(blink::mojom::PresentationServiceClient) { 44 public NON_EXPORTED_BASE(blink::mojom::PresentationServiceClient) {
42 public: 45 public:
43 explicit PresentationDispatcher(RenderFrame* render_frame); 46 explicit PresentationDispatcher(RenderFrame* render_frame);
44 ~PresentationDispatcher() override; 47 ~PresentationDispatcher() override;
45 48
46 private: 49 private:
47 struct SendMessageRequest { 50 struct SendMessageRequest {
48 SendMessageRequest(blink::mojom::PresentationSessionInfoPtr session_info, 51 SendMessageRequest(blink::mojom::PresentationSessionInfoPtr session_info,
49 blink::mojom::SessionMessagePtr message); 52 blink::mojom::ConnectionMessagePtr message);
50 ~SendMessageRequest(); 53 ~SendMessageRequest();
51 54
52 blink::mojom::PresentationSessionInfoPtr session_info; 55 blink::mojom::PresentationSessionInfoPtr session_info;
53 blink::mojom::SessionMessagePtr message; 56 blink::mojom::ConnectionMessagePtr message;
54 }; 57 };
55 58
56 static SendMessageRequest* CreateSendTextMessageRequest( 59 static SendMessageRequest* CreateSendTextMessageRequest(
57 const blink::WebURL& presentationUrl, 60 const blink::WebURL& presentationUrl,
58 const blink::WebString& presentationId, 61 const blink::WebString& presentationId,
59 const blink::WebString& message); 62 const blink::WebString& message);
60 static SendMessageRequest* CreateSendBinaryMessageRequest( 63 static SendMessageRequest* CreateSendBinaryMessageRequest(
61 const blink::WebURL& presentationUrl, 64 const blink::WebURL& presentationUrl,
62 const blink::WebString& presentationId, 65 const blink::WebString& presentationId,
63 blink::mojom::PresentationMessageType type, 66 blink::mojom::PresentationMessageType type,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // blink::mojom::PresentationServiceClient 113 // blink::mojom::PresentationServiceClient
111 void OnScreenAvailabilityNotSupported(const GURL& url) override; 114 void OnScreenAvailabilityNotSupported(const GURL& url) override;
112 void OnScreenAvailabilityUpdated(const GURL& url, bool available) override; 115 void OnScreenAvailabilityUpdated(const GURL& url, bool available) override;
113 void OnConnectionStateChanged( 116 void OnConnectionStateChanged(
114 blink::mojom::PresentationSessionInfoPtr connection, 117 blink::mojom::PresentationSessionInfoPtr connection,
115 blink::mojom::PresentationConnectionState state) override; 118 blink::mojom::PresentationConnectionState state) override;
116 void OnConnectionClosed( 119 void OnConnectionClosed(
117 blink::mojom::PresentationSessionInfoPtr connection, 120 blink::mojom::PresentationSessionInfoPtr connection,
118 blink::mojom::PresentationConnectionCloseReason reason, 121 blink::mojom::PresentationConnectionCloseReason reason,
119 const std::string& message) override; 122 const std::string& message) override;
120 void OnSessionMessagesReceived( 123 void OnConnectionMessagesReceived(
121 blink::mojom::PresentationSessionInfoPtr session_info, 124 blink::mojom::PresentationSessionInfoPtr session_info,
122 std::vector<blink::mojom::SessionMessagePtr> messages) override; 125 std::vector<blink::mojom::ConnectionMessagePtr> messages) override;
123 void OnDefaultSessionStarted( 126 void OnDefaultSessionStarted(
124 blink::mojom::PresentationSessionInfoPtr session_info) override; 127 blink::mojom::PresentationSessionInfoPtr session_info) override;
125 128
126 void OnSessionCreated( 129 void OnSessionCreated(
127 std::unique_ptr<blink::WebPresentationConnectionClientCallbacks> callback, 130 std::unique_ptr<blink::WebPresentationConnectionClientCallbacks> callback,
128 blink::mojom::PresentationSessionInfoPtr session_info, 131 blink::mojom::PresentationSessionInfoPtr session_info,
129 blink::mojom::PresentationErrorPtr error); 132 blink::mojom::PresentationErrorPtr error);
130 void OnReceiverConnectionAvailable( 133 void OnReceiverConnectionAvailable(
131 blink::mojom::PresentationSessionInfoPtr) override; 134 blink::mojom::PresentationSessionInfoPtr) override;
132 135
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Updates the listening state of availability for |status| and notifies the 184 // Updates the listening state of availability for |status| and notifies the
182 // client. 185 // client.
183 void UpdateListeningState(AvailabilityStatus* status); 186 void UpdateListeningState(AvailabilityStatus* status);
184 187
185 DISALLOW_COPY_AND_ASSIGN(PresentationDispatcher); 188 DISALLOW_COPY_AND_ASSIGN(PresentationDispatcher);
186 }; 189 };
187 190
188 } // namespace content 191 } // namespace content
189 192
190 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ 193 #endif // CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/public/common/presentation_constants.cc ('k') | content/renderer/presentation/presentation_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698