| 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/extensions/api/cast_devices_private/cast_devices_privat
e_api.h" | 5 #include "chrome/browser/extensions/api/cast_devices_private/cast_devices_privat
e_api.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/common/extensions/api/cast_devices_private.h" | 9 #include "chrome/common/extensions/api/cast_devices_private.h" |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 auto params = | 92 auto params = |
| 93 api::cast_devices_private::UpdateDevices::Params::Create(*args_); | 93 api::cast_devices_private::UpdateDevices::Params::Create(*args_); |
| 94 | 94 |
| 95 CastDeviceUpdateListeners::ReceiverAndActivityList devices; | 95 CastDeviceUpdateListeners::ReceiverAndActivityList devices; |
| 96 for (const api::cast_devices_private::ReceiverActivity& device : | 96 for (const api::cast_devices_private::ReceiverActivity& device : |
| 97 params->devices) { | 97 params->devices) { |
| 98 devices.push_back( | 98 devices.push_back( |
| 99 ConvertReceiverAndActivityType(device.receiver, device.activity.get())); | 99 ConvertReceiverAndActivityType(device.receiver, device.activity.get())); |
| 100 } | 100 } |
| 101 | 101 |
| 102 auto listeners = CastDeviceUpdateListeners::Get(browser_context()); | 102 auto* listeners = CastDeviceUpdateListeners::Get(browser_context()); |
| 103 listeners->NotifyCallbacks(devices); | 103 listeners->NotifyCallbacks(devices); |
| 104 | 104 |
| 105 return RespondNow(NoArguments()); | 105 return RespondNow(NoArguments()); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace extensions | 108 } // namespace extensions |
| OLD | NEW |