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

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

Issue 2236703002: [Extensions] Convert some SyncExtensionFunctions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nulltpr Created 4 years, 4 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 23 matching lines...) Expand all
34 34
35 // BrowserContextKeyedAPI implementation. 35 // BrowserContextKeyedAPI implementation.
36 static const char* service_name() { 36 static const char* service_name() {
37 return "AudioAPI"; 37 return "AudioAPI";
38 } 38 }
39 39
40 content::BrowserContext* const browser_context_; 40 content::BrowserContext* const browser_context_;
41 AudioService* service_; 41 AudioService* service_;
42 }; 42 };
43 43
44 class AudioGetInfoFunction : public SyncExtensionFunction { 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 bool RunSync() override; 50 ResponseAction Run() override;
51 }; 51 };
52 52
53 class AudioSetActiveDevicesFunction : public SyncExtensionFunction { 53 class AudioSetActiveDevicesFunction : public UIThreadExtensionFunction {
54 public: 54 public:
55 DECLARE_EXTENSION_FUNCTION("audio.setActiveDevices", AUDIO_SETACTIVEDEVICES); 55 DECLARE_EXTENSION_FUNCTION("audio.setActiveDevices", AUDIO_SETACTIVEDEVICES);
56 56
57 protected: 57 protected:
58 ~AudioSetActiveDevicesFunction() override {} 58 ~AudioSetActiveDevicesFunction() override {}
59 bool RunSync() override; 59 ResponseAction Run() override;
60 }; 60 };
61 61
62 class AudioSetPropertiesFunction : public SyncExtensionFunction { 62 class AudioSetPropertiesFunction : public UIThreadExtensionFunction {
63 public: 63 public:
64 DECLARE_EXTENSION_FUNCTION("audio.setProperties", AUDIO_SETPROPERTIES); 64 DECLARE_EXTENSION_FUNCTION("audio.setProperties", AUDIO_SETPROPERTIES);
65 65
66 protected: 66 protected:
67 ~AudioSetPropertiesFunction() override {} 67 ~AudioSetPropertiesFunction() override {}
68 bool RunSync() override; 68 ResponseAction Run() override;
69 }; 69 };
70 70
71 } // namespace extensions 71 } // namespace extensions
72 72
73 #endif // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_ 73 #endif // EXTENSIONS_BROWSER_API_AUDIO_AUDIO_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698