| 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/ui/ash/cast_config_client_media_router.h" | 5 #include "chrome/browser/ui/ash/cast_config_client_media_router.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "ash/public/interfaces/constants.mojom.h" | 11 #include "ash/public/interfaces/constants.mojom.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/optional.h" | 14 #include "base/optional.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "chrome/browser/chrome_notification_types.h" | 17 #include "chrome/browser/chrome_notification_types.h" |
| 18 #include "chrome/browser/media/router/media_router.h" | 18 #include "chrome/browser/media/router/media_router.h" |
| 19 #include "chrome/browser/media/router/media_router_factory.h" | 19 #include "chrome/browser/media/router/media_router_factory.h" |
| 20 #include "chrome/browser/media/router/media_router_feature.h" | 20 #include "chrome/browser/media/router/media_router_feature.h" |
| 21 #include "chrome/browser/media/router/media_routes_observer.h" | 21 #include "chrome/browser/media/router/media_routes_observer.h" |
| 22 #include "chrome/browser/media/router/media_sinks_observer.h" | 22 #include "chrome/browser/media/router/media_sinks_observer.h" |
| 23 #include "chrome/browser/media/router/media_source_helper.h" | |
| 24 #include "chrome/browser/profiles/profile_manager.h" | 23 #include "chrome/browser/profiles/profile_manager.h" |
| 24 #include "chrome/common/media_router/media_source_helper.h" |
| 25 #include "chrome/common/url_constants.h" | 25 #include "chrome/common/url_constants.h" |
| 26 #include "content/public/browser/notification_service.h" | 26 #include "content/public/browser/notification_service.h" |
| 27 #include "content/public/browser/notification_source.h" | 27 #include "content/public/browser/notification_source.h" |
| 28 #include "content/public/common/service_manager_connection.h" | 28 #include "content/public/common/service_manager_connection.h" |
| 29 #include "services/service_manager/public/cpp/connector.h" | 29 #include "services/service_manager/public/cpp/connector.h" |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 media_router::MediaRouter* media_router_for_test_ = nullptr; | 33 media_router::MediaRouter* media_router_for_test_ = nullptr; |
| 34 | 34 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 switch (type) { | 243 switch (type) { |
| 244 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: | 244 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: |
| 245 // The active profile has changed, which means that the media router has | 245 // The active profile has changed, which means that the media router has |
| 246 // as well. Reset the device cache to ensure we are using up-to-date | 246 // as well. Reset the device cache to ensure we are using up-to-date |
| 247 // object instances. | 247 // object instances. |
| 248 devices_.reset(); | 248 devices_.reset(); |
| 249 RequestDeviceRefresh(); | 249 RequestDeviceRefresh(); |
| 250 break; | 250 break; |
| 251 } | 251 } |
| 252 } | 252 } |
| OLD | NEW |