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 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" | 5 #include "chrome/browser/media/router/presentation_service_delegate_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <unordered_map> | 8 #include <unordered_map> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 void OnPresentationServiceDelegateDestroyed() const; | 157 void OnPresentationServiceDelegateDestroyed() const; |
158 | 158 |
159 void ConnectToPresentation( | 159 void ConnectToPresentation( |
160 const content::PresentationInfo& presentation_info, | 160 const content::PresentationInfo& presentation_info, |
161 content::PresentationConnectionPtr controller_connection_ptr, | 161 content::PresentationConnectionPtr controller_connection_ptr, |
162 content::PresentationConnectionRequest receiver_connection_request); | 162 content::PresentationConnectionRequest receiver_connection_request); |
163 | 163 |
164 private: | 164 private: |
165 MediaSource GetMediaSourceFromListener( | 165 MediaSource GetMediaSourceFromListener( |
166 content::PresentationScreenAvailabilityListener* listener) const; | 166 content::PresentationScreenAvailabilityListener* listener) const; |
167 base::SmallMap<std::map<std::string, MediaRoute>> presentation_id_to_route_; | 167 base::small_map<std::map<std::string, MediaRoute>> presentation_id_to_route_; |
168 base::SmallMap< | 168 base::small_map< |
169 std::map<std::string, std::unique_ptr<PresentationMediaSinksObserver>>> | 169 std::map<std::string, std::unique_ptr<PresentationMediaSinksObserver>>> |
170 url_to_sinks_observer_; | 170 url_to_sinks_observer_; |
171 std::unordered_map< | 171 std::unordered_map< |
172 MediaRoute::Id, | 172 MediaRoute::Id, |
173 std::unique_ptr<PresentationConnectionStateSubscription>> | 173 std::unique_ptr<PresentationConnectionStateSubscription>> |
174 connection_state_subscriptions_; | 174 connection_state_subscriptions_; |
175 std::unordered_map<MediaRoute::Id, | 175 std::unordered_map<MediaRoute::Id, |
176 std::unique_ptr<PresentationConnectionMessagesObserver>> | 176 std::unique_ptr<PresentationConnectionMessagesObserver>> |
177 connection_messages_observers_; | 177 connection_messages_observers_; |
178 std::unordered_map<MediaRoute::Id, | 178 std::unordered_map<MediaRoute::Id, |
(...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 const base::ListValue* origins = | 1079 const base::ListValue* origins = |
1080 Profile::FromBrowserContext(web_contents_->GetBrowserContext()) | 1080 Profile::FromBrowserContext(web_contents_->GetBrowserContext()) |
1081 ->GetPrefs() | 1081 ->GetPrefs() |
1082 ->GetList(prefs::kMediaRouterTabMirroringSources); | 1082 ->GetList(prefs::kMediaRouterTabMirroringSources); |
1083 return origins && | 1083 return origins && |
1084 origins->Find(base::Value(origin.Serialize())) != origins->end(); | 1084 origins->Find(base::Value(origin.Serialize())) != origins->end(); |
1085 } | 1085 } |
1086 #endif // !defined(OS_ANDROID) | 1086 #endif // !defined(OS_ANDROID) |
1087 | 1087 |
1088 } // namespace media_router | 1088 } // namespace media_router |
OLD | NEW |