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

Side by Side Diff: chromeos/dbus/cras_audio_client.h

Issue 23444057: Reduce chrome cras dbus call logs during device rebooting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename EnableLog Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/audio/cras_audio_handler.cc ('k') | chromeos/dbus/cras_audio_client.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_DBUS_CRAS_AUDIO_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_
6 #define CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ 6 #define CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "chromeos/chromeos_export.h" 10 #include "chromeos/chromeos_export.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // 2 arguments, |volume_state| which containing both input and output volume 56 // 2 arguments, |volume_state| which containing both input and output volume
57 // state data, and |success| which indicates whether or not the request 57 // state data, and |success| which indicates whether or not the request
58 // succeeded. 58 // succeeded.
59 typedef base::Callback<void(const VolumeState&, bool)> GetVolumeStateCallback; 59 typedef base::Callback<void(const VolumeState&, bool)> GetVolumeStateCallback;
60 60
61 // GetNodesCallback is used for GetNodes method. It receives 2 arguments, 61 // GetNodesCallback is used for GetNodes method. It receives 2 arguments,
62 // |audio_nodes| which containing a list of audio nodes data and 62 // |audio_nodes| which containing a list of audio nodes data and
63 // |success| which indicates whether or not the request succeeded. 63 // |success| which indicates whether or not the request succeeded.
64 typedef base::Callback<void(const AudioNodeList&, bool)> GetNodesCallback; 64 typedef base::Callback<void(const AudioNodeList&, bool)> GetNodesCallback;
65 65
66 // ErrorCallback is used for cras dbus method error response. It receives 2
67 // arguments, |error_name| indicates the dbus error name, and |error_message|
68 // contains the detailed dbus error message.
69 typedef base::Callback<void(const std::string&,
70 const std::string&)> ErrorCallback;
71
66 // Gets the volume state, asynchronously. 72 // Gets the volume state, asynchronously.
67 virtual void GetVolumeState(const GetVolumeStateCallback& callback) = 0; 73 virtual void GetVolumeState(const GetVolumeStateCallback& callback) = 0;
68 74
69 // Gets an array of audio input and output nodes. 75 // Gets an array of audio input and output nodes.
70 virtual void GetNodes(const GetNodesCallback& callback) = 0; 76 virtual void GetNodes(const GetNodesCallback& callback,
77 const ErrorCallback& error_callback) = 0;
71 78
72 // Sets output volume of the given |node_id| to |volume|, in the rage of 79 // Sets output volume of the given |node_id| to |volume|, in the rage of
73 // [0, 100]. 80 // [0, 100].
74 virtual void SetOutputNodeVolume(uint64 node_id, int32 volume) = 0; 81 virtual void SetOutputNodeVolume(uint64 node_id, int32 volume) = 0;
75 82
76 // Sets output mute from user action. 83 // Sets output mute from user action.
77 virtual void SetOutputUserMute(bool mute_on) = 0; 84 virtual void SetOutputUserMute(bool mute_on) = 0;
78 85
79 // Sets input gain of the given |node_id| to |gain|, in the range of 86 // Sets input gain of the given |node_id| to |gain|, in the range of
80 // [0, 100]. 87 // [0, 100].
(...skipping 16 matching lines...) Expand all
97 CrasAudioClient(); 104 CrasAudioClient();
98 105
99 private: 106 private:
100 107
101 DISALLOW_COPY_AND_ASSIGN(CrasAudioClient); 108 DISALLOW_COPY_AND_ASSIGN(CrasAudioClient);
102 }; 109 };
103 110
104 } // namespace chromeos 111 } // namespace chromeos
105 112
106 #endif // CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_ 113 #endif // CHROMEOS_DBUS_CRAS_AUDIO_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/audio/cras_audio_handler.cc ('k') | chromeos/dbus/cras_audio_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698