Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_MEDIA_PERCEPTION_PRIVATE _API_H_ | |
| 6 #define EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_MEDIA_PERCEPTION_PRIVATE _API_H_ | |
| 7 | |
| 8 #include "extensions/browser/extension_function.h" | |
| 9 #include "extensions/common/api/media_perception_private.h" | |
| 10 | |
| 11 namespace media_perception = extensions::api::media_perception_private; | |
| 12 | |
| 13 namespace extensions { | |
| 14 | |
| 15 class MediaPerceptionPrivateGetStateFunction : public AsyncExtensionFunction { | |
|
tbarzic
2017/05/05 21:10:41
I think AsyncExtenionFunction is deprecated.
Can y
Luke Sorenson
2017/05/08 19:06:06
Done. In https://codereview.chromium.org/286020300
| |
| 16 public: | |
| 17 MediaPerceptionPrivateGetStateFunction(); | |
| 18 DECLARE_EXTENSION_FUNCTION("mediaPerceptionPrivate.getState", | |
| 19 MEDIAPERCEPTIONPRIVATE_GETSTATE); | |
| 20 | |
| 21 private: | |
| 22 ~MediaPerceptionPrivateGetStateFunction() override; | |
| 23 bool RunAsync() override; | |
| 24 | |
| 25 void GetStateCallback(bool succeeded, media_perception::State state); | |
| 26 | |
| 27 DISALLOW_COPY_AND_ASSIGN(MediaPerceptionPrivateGetStateFunction); | |
| 28 }; | |
| 29 | |
| 30 class MediaPerceptionPrivateSetStateFunction : public AsyncExtensionFunction { | |
| 31 public: | |
| 32 MediaPerceptionPrivateSetStateFunction(); | |
| 33 DECLARE_EXTENSION_FUNCTION("mediaPerceptionPrivate.setState", | |
| 34 MEDIAPERCEPTIONPRIVATE_SETSTATE); | |
| 35 | |
| 36 private: | |
| 37 ~MediaPerceptionPrivateSetStateFunction() override; | |
| 38 bool RunAsync() override; | |
| 39 | |
| 40 void SetStateCallback(bool succeeded, media_perception::State state); | |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(MediaPerceptionPrivateSetStateFunction); | |
| 43 }; | |
| 44 | |
| 45 class MediaPerceptionPrivateGetDiagnosticsFunction | |
| 46 : public AsyncExtensionFunction { | |
| 47 public: | |
| 48 MediaPerceptionPrivateGetDiagnosticsFunction(); | |
| 49 DECLARE_EXTENSION_FUNCTION("mediaPerceptionPrivate.getDiagnostics", | |
| 50 MEDIAPERCEPTIONPRIVATE_GETDIAGNOSTICS); | |
| 51 | |
| 52 private: | |
| 53 ~MediaPerceptionPrivateGetDiagnosticsFunction() override; | |
| 54 bool RunAsync() override; | |
| 55 | |
| 56 void GetDiagnosticsCallback(bool succeeded, | |
| 57 media_perception::Diagnostics diagnostics); | |
| 58 | |
| 59 DISALLOW_COPY_AND_ASSIGN(MediaPerceptionPrivateGetDiagnosticsFunction); | |
| 60 }; | |
| 61 | |
| 62 } // namespace extensions | |
| 63 | |
| 64 #endif // EXTENSIONS_BROWSER_API_MEDIA_PERCEPTION_PRIVATE_MEDIA_PERCEPTION_PRIV ATE_API_H_ | |
| OLD | NEW |