| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_DISPLAY_SYSTEM_INFO_DISPLAY_AP
I_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_DISPLAY_SYSTEM_INFO_DISPLAY_AP
I_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_DISPLAY_SYSTEM_INFO_DISPLAY_AP
I_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_DISPLAY_SYSTEM_INFO_DISPLAY_AP
I_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/extensions/api/system_info_display/display_info_provide
r.h" | 10 #include "chrome/browser/extensions/api/system_info_display/display_info_provide
r.h" |
| 11 #include "chrome/browser/extensions/extension_function.h" | 11 #include "chrome/browser/extensions/extension_function.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 class SystemInfoDisplayGetDisplayInfoFunction : public AsyncExtensionFunction { | 15 class SystemInfoDisplayGetDisplayInfoFunction : public AsyncExtensionFunction { |
| 16 public: | 16 public: |
| 17 DECLARE_EXTENSION_FUNCTION("systemInfo.display.getDisplayInfo", | 17 DECLARE_EXTENSION_FUNCTION("systemInfo.display.getDisplayInfo", |
| 18 SYSTEMINFO_DISPLAY_GETDISPLAYINFO); | 18 SYSTEMINFO_DISPLAY_GETDISPLAYINFO); |
| 19 | 19 |
| 20 protected: | 20 protected: |
| 21 virtual ~SystemInfoDisplayGetDisplayInfoFunction() {} | 21 virtual ~SystemInfoDisplayGetDisplayInfoFunction() {} |
| 22 virtual bool RunImpl() OVERRIDE; | 22 virtual bool RunImpl() OVERRIDE; |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 void OnGetDisplayInfoCompleted(const DisplayInfo& info, bool success); | 25 void OnGetDisplayInfoCompleted(bool success); |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 class SystemInfoDisplaySetDisplayPropertiesFunction | 28 class SystemInfoDisplaySetDisplayPropertiesFunction |
| 29 : public AsyncExtensionFunction { | 29 : public AsyncExtensionFunction { |
| 30 public: | 30 public: |
| 31 DECLARE_EXTENSION_FUNCTION("systemInfo.display.setDisplayProperties", | 31 DECLARE_EXTENSION_FUNCTION("systemInfo.display.setDisplayProperties", |
| 32 SYSTEMINFO_DISPLAY_SETDISPLAYPROPERTIES); | 32 SYSTEMINFO_DISPLAY_SETDISPLAYPROPERTIES); |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 virtual ~SystemInfoDisplaySetDisplayPropertiesFunction() {} | 35 virtual ~SystemInfoDisplaySetDisplayPropertiesFunction() {} |
| 36 virtual bool RunImpl() OVERRIDE; | 36 virtual bool RunImpl() OVERRIDE; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 void OnPropertiesSet(bool success, const std::string& error); | 39 void OnPropertiesSet(bool success, const std::string& error); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace extensions | 42 } // namespace extensions |
| 43 | 43 |
| 44 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_DISPLAY_SYSTEM_INFO_DISPLAY
_API_H__ | 44 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INFO_DISPLAY_SYSTEM_INFO_DISPLAY
_API_H__ |
| OLD | NEW |