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

Side by Side Diff: chrome/browser/media/router/browser_presentation_connection_proxy.h

Issue 2706463002: [Presentation API] Mojo typemap for content::PresentationConnectionMessage (Closed)
Patch Set: Fix compile error after rebase 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
« no previous file with comments | « no previous file | chrome/browser/media/router/browser_presentation_connection_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROME_BROWSER_MEDIA_ROUTER_BROWSER_PRESENTATION_CONNECTION_PROXY_H_ 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_BROWSER_PRESENTATION_CONNECTION_PROXY_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_BROWSER_PRESENTATION_CONNECTION_PROXY_H_ 6 #define CHROME_BROWSER_MEDIA_ROUTER_BROWSER_PRESENTATION_CONNECTION_PROXY_H_
7 7
8 #include "chrome/browser/media/router/media_route.h" 8 #include "chrome/browser/media/router/media_route.h"
9 #include "content/public/browser/presentation_service_delegate.h" 9 #include "content/public/browser/presentation_service_delegate.h"
10 #include "content/public/common/presentation_connection_message.h"
10 #include "content/public/common/presentation_session.h" 11 #include "content/public/common/presentation_session.h"
11 #include "mojo/public/cpp/bindings/binding.h" 12 #include "mojo/public/cpp/bindings/binding.h"
12 13
13 namespace media_router { 14 namespace media_router {
14 15
15 class MediaRouter; 16 class MediaRouter;
16 17
17 // This class represents a browser side PresentationConnection. It connects with 18 // This class represents a browser side PresentationConnection. It connects with
18 // PresentationConnection owned by a render frame to enable message exchange. 19 // PresentationConnection owned by a render frame to enable message exchange.
19 // Message received on this class is further routed to Media Router. State of 20 // Message received on this class is further routed to Media Router. State of
(...skipping 28 matching lines...) Expand all
48 // |controller_connection_ptr|: mojo interface ptr of controlling frame's 49 // |controller_connection_ptr|: mojo interface ptr of controlling frame's
49 // connection proxy object. 50 // connection proxy object.
50 BrowserPresentationConnectionProxy( 51 BrowserPresentationConnectionProxy(
51 MediaRouter* router, 52 MediaRouter* router,
52 const MediaRoute::Id& route_id, 53 const MediaRoute::Id& route_id,
53 blink::mojom::PresentationConnectionRequest receiver_connection_request, 54 blink::mojom::PresentationConnectionRequest receiver_connection_request,
54 blink::mojom::PresentationConnectionPtr controller_connection_ptr); 55 blink::mojom::PresentationConnectionPtr controller_connection_ptr);
55 ~BrowserPresentationConnectionProxy() override; 56 ~BrowserPresentationConnectionProxy() override;
56 57
57 // blink::mojom::PresentationConnection implementation 58 // blink::mojom::PresentationConnection implementation
58 void OnMessage(blink::mojom::ConnectionMessagePtr message, 59 void OnMessage(content::PresentationConnectionMessage message,
59 const OnMessageCallback& on_message_callback) override; 60 const OnMessageCallback& on_message_callback) override;
60 61
61 // Underlying media route is always connected. Media route class does not 62 // Underlying media route is always connected. Media route class does not
62 // support state change. 63 // support state change.
63 void DidChangeState(content::PresentationConnectionState state) override {} 64 void DidChangeState(content::PresentationConnectionState state) override {}
64 65
65 // Underlying media route is always connected. Media route class does not 66 // Underlying media route is always connected. Media route class does not
66 // support state change. 67 // support state change.
67 void OnClose() override {} 68 void OnClose() override {}
68 69
69 private: 70 private:
70 // |router_| not owned by this class. 71 // |router_| not owned by this class.
71 MediaRouter* const router_; 72 MediaRouter* const router_;
72 const MediaRoute::Id route_id_; 73 const MediaRoute::Id route_id_;
73 74
74 mojo::Binding<blink::mojom::PresentationConnection> binding_; 75 mojo::Binding<blink::mojom::PresentationConnection> binding_;
75 blink::mojom::PresentationConnectionPtr target_connection_ptr_; 76 blink::mojom::PresentationConnectionPtr target_connection_ptr_;
76 }; 77 };
77 78
78 } // namespace media_router 79 } // namespace media_router
79 80
80 #endif // CHROME_BROWSER_MEDIA_ROUTER_BROWSER_PRESENTATION_CONNECTION_PROXY_H_ 81 #endif // CHROME_BROWSER_MEDIA_ROUTER_BROWSER_PRESENTATION_CONNECTION_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/router/browser_presentation_connection_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698