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

Side by Side Diff: chrome/browser/extensions/api/cast_devices_private/cast_devices_private_api.cc

Issue 1828683002: [Extensions] Convert APIs to use movable types [3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Antony's Created 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/certificate_provider/certificate_provider_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 86
87 CastDevicesPrivateUpdateDevicesFunction:: 87 CastDevicesPrivateUpdateDevicesFunction::
88 ~CastDevicesPrivateUpdateDevicesFunction() {} 88 ~CastDevicesPrivateUpdateDevicesFunction() {}
89 89
90 ExtensionFunction::ResponseAction 90 ExtensionFunction::ResponseAction
91 CastDevicesPrivateUpdateDevicesFunction::Run() { 91 CastDevicesPrivateUpdateDevicesFunction::Run() {
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 (linked_ptr<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(ConvertReceiverAndActivityType(device->receiver, 98 devices.push_back(
99 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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/certificate_provider/certificate_provider_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698