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

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: 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 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(const 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 private: 66 private:
66 // |router_| not owned by this class. 67 // |router_| not owned by this class.
67 MediaRouter* const router_; 68 MediaRouter* const router_;
68 const MediaRoute::Id route_id_; 69 const MediaRoute::Id route_id_;
69 70
70 mojo::Binding<blink::mojom::PresentationConnection> binding_; 71 mojo::Binding<blink::mojom::PresentationConnection> binding_;
71 blink::mojom::PresentationConnectionPtr target_connection_ptr_; 72 blink::mojom::PresentationConnectionPtr target_connection_ptr_;
72 }; 73 };
73 74
74 } // namespace media_router 75 } // namespace media_router
75 76
76 #endif // CHROME_BROWSER_MEDIA_ROUTER_BROWSER_PRESENTATION_CONNECTION_PROXY_H_ 77 #endif // CHROME_BROWSER_MEDIA_ROUTER_BROWSER_PRESENTATION_CONNECTION_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698