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

Side by Side Diff: extensions/browser/api/audio/audio_api.h

Issue 2605983002: Simplify logic behind chrome.audio.setActiveDevices (Closed)
Patch Set: . Created 3 years, 11 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 #ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_ 5 #ifndef EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_
6 #define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_ 6 #define EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_
7 7
8 #include "extensions/browser/api/audio/audio_service.h" 8 #include "extensions/browser/api/audio/audio_service.h"
9 #include "extensions/browser/browser_context_keyed_api_factory.h" 9 #include "extensions/browser/browser_context_keyed_api_factory.h"
10 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 class AudioGetInfoFunction : public UIThreadExtensionFunction { 44 class AudioGetInfoFunction : public UIThreadExtensionFunction {
45 public: 45 public:
46 DECLARE_EXTENSION_FUNCTION("audio.getInfo", AUDIO_GETINFO); 46 DECLARE_EXTENSION_FUNCTION("audio.getInfo", AUDIO_GETINFO);
47 47
48 protected: 48 protected:
49 ~AudioGetInfoFunction() override {} 49 ~AudioGetInfoFunction() override {}
50 ResponseAction Run() override; 50 ResponseAction Run() override;
51 }; 51 };
52 52
53 class AudioSetActiveDeviceListsFunction : public UIThreadExtensionFunction {
54 public:
55 DECLARE_EXTENSION_FUNCTION("audio.setActiveDeviceLists",
56 AUDIO_SETACTIVEDEVICELISTS);
57
58 protected:
59 ~AudioSetActiveDeviceListsFunction() override {}
60 ResponseAction Run() override;
61 };
62
53 class AudioSetActiveDevicesFunction : public UIThreadExtensionFunction { 63 class AudioSetActiveDevicesFunction : public UIThreadExtensionFunction {
54 public: 64 public:
55 DECLARE_EXTENSION_FUNCTION("audio.setActiveDevices", AUDIO_SETACTIVEDEVICES); 65 DECLARE_EXTENSION_FUNCTION("audio.setActiveDevices", AUDIO_SETACTIVEDEVICES);
56 66
57 protected: 67 protected:
58 ~AudioSetActiveDevicesFunction() override {} 68 ~AudioSetActiveDevicesFunction() override {}
59 ResponseAction Run() override; 69 ResponseAction Run() override;
60 }; 70 };
61 71
62 class AudioSetPropertiesFunction : public UIThreadExtensionFunction { 72 class AudioSetPropertiesFunction : public UIThreadExtensionFunction {
63 public: 73 public:
64 DECLARE_EXTENSION_FUNCTION("audio.setProperties", AUDIO_SETPROPERTIES); 74 DECLARE_EXTENSION_FUNCTION("audio.setProperties", AUDIO_SETPROPERTIES);
65 75
66 protected: 76 protected:
67 ~AudioSetPropertiesFunction() override {} 77 ~AudioSetPropertiesFunction() override {}
68 ResponseAction Run() override; 78 ResponseAction Run() override;
69 }; 79 };
70 80
71 } // namespace extensions 81 } // namespace extensions
72 82
73 #endif // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_ 83 #endif // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698