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

Side by Side Diff: extensions/browser/api/audio/audio_service_chromeos.cc

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "extensions/browser/api/audio/audio_service.h" 5 #include "extensions/browser/api/audio/audio_service.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "chromeos/audio/audio_device.h" 10 #include "chromeos/audio/audio_device.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 private: 50 private:
51 void NotifyDeviceChanged(); 51 void NotifyDeviceChanged();
52 void NotifyLevelChanged(uint64_t id, int level); 52 void NotifyLevelChanged(uint64_t id, int level);
53 void NotifyMuteChanged(bool is_input, bool is_muted); 53 void NotifyMuteChanged(bool is_input, bool is_muted);
54 void NotifyDevicesChanged(); 54 void NotifyDevicesChanged();
55 55
56 bool FindDevice(uint64_t id, chromeos::AudioDevice* device); 56 bool FindDevice(uint64_t id, chromeos::AudioDevice* device);
57 uint64_t GetIdFromStr(const std::string& id_str); 57 uint64_t GetIdFromStr(const std::string& id_str);
58 58
59 // List of observers. 59 // List of observers.
60 ObserverList<AudioService::Observer> observer_list_; 60 base::ObserverList<AudioService::Observer> observer_list_;
61 61
62 chromeos::CrasAudioHandler* cras_audio_handler_; 62 chromeos::CrasAudioHandler* cras_audio_handler_;
63 63
64 // Note: This should remain the last member so it'll be destroyed and 64 // Note: This should remain the last member so it'll be destroyed and
65 // invalidate the weak pointers before any other members are destroyed. 65 // invalidate the weak pointers before any other members are destroyed.
66 base::WeakPtrFactory<AudioServiceImpl> weak_ptr_factory_; 66 base::WeakPtrFactory<AudioServiceImpl> weak_ptr_factory_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(AudioServiceImpl); 68 DISALLOW_COPY_AND_ASSIGN(AudioServiceImpl);
69 }; 69 };
70 70
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // Notify DeviceChanged event for backward compatibility. 281 // Notify DeviceChanged event for backward compatibility.
282 // TODO(jennyz): remove this code when the old version of hotrod retires. 282 // TODO(jennyz): remove this code when the old version of hotrod retires.
283 NotifyDeviceChanged(); 283 NotifyDeviceChanged();
284 } 284 }
285 285
286 AudioService* AudioService::CreateInstance() { 286 AudioService* AudioService::CreateInstance() {
287 return new AudioServiceImpl; 287 return new AudioServiceImpl;
288 } 288 }
289 289
290 } // namespace extensions 290 } // namespace extensions
OLDNEW
« no previous file with comments | « device/usb/usb_service.h ('k') | extensions/browser/api/networking_private/networking_private_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698