OLD | NEW |
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 CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ | 6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <deque> | 10 #include <deque> |
9 #include <map> | 11 #include <map> |
10 #include <set> | 12 #include <set> |
11 #include <string> | 13 #include <string> |
12 #include <vector> | 14 #include <vector> |
13 | 15 |
14 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
15 #include "base/containers/scoped_ptr_hash_map.h" | 17 #include "base/containers/scoped_ptr_hash_map.h" |
16 #include "base/gtest_prod_util.h" | 18 #include "base/gtest_prod_util.h" |
17 #include "base/macros.h" | 19 #include "base/macros.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 const GURL& origin, | 76 const GURL& origin, |
75 content::WebContents* web_contents, | 77 content::WebContents* web_contents, |
76 const std::vector<MediaRouteResponseCallback>& callbacks) override; | 78 const std::vector<MediaRouteResponseCallback>& callbacks) override; |
77 void TerminateRoute(const MediaRoute::Id& route_id) override; | 79 void TerminateRoute(const MediaRoute::Id& route_id) override; |
78 void DetachRoute(const MediaRoute::Id& route_id) override; | 80 void DetachRoute(const MediaRoute::Id& route_id) override; |
79 void SendRouteMessage(const MediaRoute::Id& route_id, | 81 void SendRouteMessage(const MediaRoute::Id& route_id, |
80 const std::string& message, | 82 const std::string& message, |
81 const SendRouteMessageCallback& callback) override; | 83 const SendRouteMessageCallback& callback) override; |
82 void SendRouteBinaryMessage( | 84 void SendRouteBinaryMessage( |
83 const MediaRoute::Id& route_id, | 85 const MediaRoute::Id& route_id, |
84 scoped_ptr<std::vector<uint8>> data, | 86 scoped_ptr<std::vector<uint8_t>> data, |
85 const SendRouteMessageCallback& callback) override; | 87 const SendRouteMessageCallback& callback) override; |
86 void AddIssue(const Issue& issue) override; | 88 void AddIssue(const Issue& issue) override; |
87 void ClearIssue(const Issue::Id& issue_id) override; | 89 void ClearIssue(const Issue::Id& issue_id) override; |
88 bool HasLocalDisplayRoute() const override; | 90 bool HasLocalDisplayRoute() const override; |
89 | 91 |
90 const std::string& media_route_provider_extension_id() const { | 92 const std::string& media_route_provider_extension_id() const { |
91 return media_route_provider_extension_id_; | 93 return media_route_provider_extension_id_; |
92 } | 94 } |
93 | 95 |
94 void set_instance_id_for_test(const std::string& instance_id) { | 96 void set_instance_id_for_test(const std::string& instance_id) { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 const std::string& presentation_id, | 213 const std::string& presentation_id, |
212 const std::string& origin, | 214 const std::string& origin, |
213 int tab_id, | 215 int tab_id, |
214 const std::vector<MediaRouteResponseCallback>& callbacks); | 216 const std::vector<MediaRouteResponseCallback>& callbacks); |
215 void DoTerminateRoute(const MediaRoute::Id& route_id); | 217 void DoTerminateRoute(const MediaRoute::Id& route_id); |
216 void DoDetachRoute(const MediaRoute::Id& route_id); | 218 void DoDetachRoute(const MediaRoute::Id& route_id); |
217 void DoSendSessionMessage(const MediaRoute::Id& route_id, | 219 void DoSendSessionMessage(const MediaRoute::Id& route_id, |
218 const std::string& message, | 220 const std::string& message, |
219 const SendRouteMessageCallback& callback); | 221 const SendRouteMessageCallback& callback); |
220 void DoSendSessionBinaryMessage(const MediaRoute::Id& route_id, | 222 void DoSendSessionBinaryMessage(const MediaRoute::Id& route_id, |
221 scoped_ptr<std::vector<uint8>> data, | 223 scoped_ptr<std::vector<uint8_t>> data, |
222 const SendRouteMessageCallback& callback); | 224 const SendRouteMessageCallback& callback); |
223 void DoListenForRouteMessages(const MediaRoute::Id& route_id); | 225 void DoListenForRouteMessages(const MediaRoute::Id& route_id); |
224 void DoStopListeningForRouteMessages(const MediaRoute::Id& route_id); | 226 void DoStopListeningForRouteMessages(const MediaRoute::Id& route_id); |
225 void DoStartObservingMediaSinks(const MediaSource::Id& source_id); | 227 void DoStartObservingMediaSinks(const MediaSource::Id& source_id); |
226 void DoStopObservingMediaSinks(const MediaSource::Id& source_id); | 228 void DoStopObservingMediaSinks(const MediaSource::Id& source_id); |
227 void DoStartObservingMediaRoutes(); | 229 void DoStartObservingMediaRoutes(); |
228 void DoStopObservingMediaRoutes(); | 230 void DoStopObservingMediaRoutes(); |
229 | 231 |
230 // Invoked when the next batch of messages arrives. | 232 // Invoked when the next batch of messages arrives. |
231 // |route_id|: ID of route of the messages. | 233 // |route_id|: ID of route of the messages. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 MediaRouteProviderWakeReason current_wake_reason_; | 356 MediaRouteProviderWakeReason current_wake_reason_; |
355 | 357 |
356 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; | 358 base::WeakPtrFactory<MediaRouterMojoImpl> weak_factory_; |
357 | 359 |
358 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); | 360 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoImpl); |
359 }; | 361 }; |
360 | 362 |
361 } // namespace media_router | 363 } // namespace media_router |
362 | 364 |
363 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ | 365 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_IMPL_H_ |
OLD | NEW |