| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ |
| 6 #define EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ | 6 #define EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "extensions/browser/extension_function.h" | 10 #include "extensions/browser/extension_function.h" |
| 11 | 11 |
| 12 namespace extensions { | 12 namespace extensions { |
| 13 | 13 |
| 14 class SystemDisplayGetInfoFunction : public SyncExtensionFunction { | 14 class SystemDisplayFunction : public SyncExtensionFunction { |
| 15 public: |
| 16 static const char kCrosOnlyError[]; |
| 17 static const char kKioskOnlyError[]; |
| 18 |
| 19 protected: |
| 20 ~SystemDisplayFunction() override {} |
| 21 bool CheckValidExtension(); |
| 22 }; |
| 23 |
| 24 class SystemDisplayGetInfoFunction : public SystemDisplayFunction { |
| 15 public: | 25 public: |
| 16 DECLARE_EXTENSION_FUNCTION("system.display.getInfo", SYSTEM_DISPLAY_GETINFO); | 26 DECLARE_EXTENSION_FUNCTION("system.display.getInfo", SYSTEM_DISPLAY_GETINFO); |
| 17 | 27 |
| 18 protected: | 28 protected: |
| 19 ~SystemDisplayGetInfoFunction() override {} | 29 ~SystemDisplayGetInfoFunction() override {} |
| 20 bool RunSync() override; | 30 bool RunSync() override; |
| 21 }; | 31 }; |
| 22 | 32 |
| 23 class SystemDisplaySetDisplayPropertiesFunction : public SyncExtensionFunction { | 33 class SystemDisplaySetDisplayPropertiesFunction : public SystemDisplayFunction { |
| 24 public: | 34 public: |
| 25 DECLARE_EXTENSION_FUNCTION("system.display.setDisplayProperties", | 35 DECLARE_EXTENSION_FUNCTION("system.display.setDisplayProperties", |
| 26 SYSTEM_DISPLAY_SETDISPLAYPROPERTIES); | 36 SYSTEM_DISPLAY_SETDISPLAYPROPERTIES); |
| 27 | 37 |
| 28 protected: | 38 protected: |
| 29 ~SystemDisplaySetDisplayPropertiesFunction() override {} | 39 ~SystemDisplaySetDisplayPropertiesFunction() override {} |
| 30 bool RunSync() override; | 40 bool RunSync() override; |
| 31 }; | 41 }; |
| 32 | 42 |
| 33 class SystemDisplayEnableUnifiedDesktopFunction : public SyncExtensionFunction { | 43 class SystemDisplayEnableUnifiedDesktopFunction : public SystemDisplayFunction { |
| 34 public: | 44 public: |
| 35 DECLARE_EXTENSION_FUNCTION("system.display.enableUnifiedDesktop", | 45 DECLARE_EXTENSION_FUNCTION("system.display.enableUnifiedDesktop", |
| 36 SYSTEM_DISPLAY_ENABLEUNIFIEDDESKTOP); | 46 SYSTEM_DISPLAY_ENABLEUNIFIEDDESKTOP); |
| 37 | 47 |
| 38 protected: | 48 protected: |
| 39 ~SystemDisplayEnableUnifiedDesktopFunction() override {} | 49 ~SystemDisplayEnableUnifiedDesktopFunction() override {} |
| 40 bool RunSync() override; | 50 bool RunSync() override; |
| 41 }; | 51 }; |
| 42 | 52 |
| 53 class SystemDisplayOverscanCalibrationStartFunction |
| 54 : public SystemDisplayFunction { |
| 55 public: |
| 56 DECLARE_EXTENSION_FUNCTION("system.display.overscanCalibrationStart", |
| 57 SYSTEM_DISPLAY_OVERSCANCALIBRATIONSTART); |
| 58 |
| 59 protected: |
| 60 ~SystemDisplayOverscanCalibrationStartFunction() override {} |
| 61 bool RunSync() override; |
| 62 }; |
| 63 |
| 64 class SystemDisplayOverscanCalibrationAdjustFunction |
| 65 : public SystemDisplayFunction { |
| 66 public: |
| 67 DECLARE_EXTENSION_FUNCTION("system.display.overscanCalibrationAdjust", |
| 68 SYSTEM_DISPLAY_OVERSCANCALIBRATIONADJUST); |
| 69 |
| 70 protected: |
| 71 ~SystemDisplayOverscanCalibrationAdjustFunction() override {} |
| 72 bool RunSync() override; |
| 73 }; |
| 74 |
| 75 class SystemDisplayOverscanCalibrationResetFunction |
| 76 : public SystemDisplayFunction { |
| 77 public: |
| 78 DECLARE_EXTENSION_FUNCTION("system.display.overscanCalibrationReset", |
| 79 SYSTEM_DISPLAY_OVERSCANCALIBRATIONRESET); |
| 80 |
| 81 protected: |
| 82 ~SystemDisplayOverscanCalibrationResetFunction() override {} |
| 83 bool RunSync() override; |
| 84 }; |
| 85 |
| 86 class SystemDisplayOverscanCalibrationCompleteFunction |
| 87 : public SystemDisplayFunction { |
| 88 public: |
| 89 DECLARE_EXTENSION_FUNCTION("system.display.overscanCalibrationComplete", |
| 90 SYSTEM_DISPLAY_OVERSCANCALIBRATIONCOMPLETE); |
| 91 |
| 92 protected: |
| 93 ~SystemDisplayOverscanCalibrationCompleteFunction() override {} |
| 94 bool RunSync() override; |
| 95 }; |
| 96 |
| 43 } // namespace extensions | 97 } // namespace extensions |
| 44 | 98 |
| 45 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ | 99 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ |
| OLD | NEW |