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

Side by Side Diff: chromeos/audio/cras_audio_handler.h

Issue 552323003: Changing the order of initialization WeakPtrFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | chromeos/audio/cras_audio_handler.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 (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 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ 5 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ 6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 void HandleGetNodesError(const std::string& error_name, 248 void HandleGetNodesError(const std::string& error_name,
249 const std::string& error_msg); 249 const std::string& error_msg);
250 250
251 // Returns true if |device| is not found in audio_devices_. 251 // Returns true if |device| is not found in audio_devices_.
252 bool FoundNewDevice(const AudioDevice& device); 252 bool FoundNewDevice(const AudioDevice& device);
253 253
254 // Returns a sanitized AudioDevice from |node|. 254 // Returns a sanitized AudioDevice from |node|.
255 AudioDevice GetSanitizedAudioDevice(const AudioNode& node); 255 AudioDevice GetSanitizedAudioDevice(const AudioNode& node);
256 256
257 scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler_; 257 scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler_;
258 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_;
259 ObserverList<AudioObserver> observers_; 258 ObserverList<AudioObserver> observers_;
260 259
261 // Audio data and state. 260 // Audio data and state.
262 AudioDeviceMap audio_devices_; 261 AudioDeviceMap audio_devices_;
263 262
264 AudioDevicePriorityQueue input_devices_pq_; 263 AudioDevicePriorityQueue input_devices_pq_;
265 AudioDevicePriorityQueue output_devices_pq_; 264 AudioDevicePriorityQueue output_devices_pq_;
266 265
267 bool output_mute_on_; 266 bool output_mute_on_;
268 bool input_mute_on_; 267 bool input_mute_on_;
269 int output_volume_; 268 int output_volume_;
270 int input_gain_; 269 int input_gain_;
271 uint64 active_output_node_id_; 270 uint64 active_output_node_id_;
272 uint64 active_input_node_id_; 271 uint64 active_input_node_id_;
273 bool has_alternative_input_; 272 bool has_alternative_input_;
274 bool has_alternative_output_; 273 bool has_alternative_output_;
275 274
276 bool output_mute_locked_; 275 bool output_mute_locked_;
277 bool input_mute_locked_; 276 bool input_mute_locked_;
278 277
279 // Failures are not logged at startup, since CRAS may not be running yet. 278 // Failures are not logged at startup, since CRAS may not be running yet.
280 bool log_errors_; 279 bool log_errors_;
281 280
281 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_;
282
282 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); 283 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler);
283 }; 284 };
284 285
285 } // namespace chromeos 286 } // namespace chromeos
286 287
287 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ 288 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chromeos/audio/cras_audio_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698