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

Side by Side Diff: chrome/browser/extensions/api/system_display/system_display_api.h

Issue 23441032: [SystemInfo API] Rewrite DisplayInfoProvider without SystemInfoProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing head file Created 7 years, 3 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 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 CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/extensions/api/system_display/display_info_provider.h"
11 #include "chrome/browser/extensions/extension_function.h" 10 #include "chrome/browser/extensions/extension_function.h"
12 11
13 namespace extensions { 12 namespace extensions {
14 13
15 class SystemDisplayGetInfoFunction : public AsyncExtensionFunction { 14 class SystemDisplayGetInfoFunction : public AsyncExtensionFunction {
oshima 2013/09/03 23:14:46 Shouldn't this be UIThreadExtensionFunction?
Haojian Wu 2013/09/04 12:11:33 Refer to http://www.chromium.org/developers/design
oshima 2013/09/06 18:30:48 Shouldn't this be SyncExtensionFunction then?
Haojian Wu 2013/09/07 03:16:53 Oh, Yeah. Should be SyncExtensionFunction. Done.
16 public: 15 public:
17 DECLARE_EXTENSION_FUNCTION("system.display.getInfo", 16 DECLARE_EXTENSION_FUNCTION("system.display.getInfo",
18 SYSTEM_DISPLAY_GETINFO); 17 SYSTEM_DISPLAY_GETINFO);
19 18
20 protected: 19 protected:
21 virtual ~SystemDisplayGetInfoFunction() {} 20 virtual ~SystemDisplayGetInfoFunction() {}
22 virtual bool RunImpl() OVERRIDE; 21 virtual bool RunImpl() OVERRIDE;
23
24 private:
25 void OnGetDisplayInfoCompleted(bool success);
26 }; 22 };
27 23
28 class SystemDisplaySetDisplayPropertiesFunction 24 class SystemDisplaySetDisplayPropertiesFunction
29 : public AsyncExtensionFunction { 25 : public AsyncExtensionFunction {
30 public: 26 public:
31 DECLARE_EXTENSION_FUNCTION("system.display.setDisplayProperties", 27 DECLARE_EXTENSION_FUNCTION("system.display.setDisplayProperties",
32 SYSTEM_DISPLAY_SETDISPLAYPROPERTIES); 28 SYSTEM_DISPLAY_SETDISPLAYPROPERTIES);
33 29
34 protected: 30 protected:
35 virtual ~SystemDisplaySetDisplayPropertiesFunction() {} 31 virtual ~SystemDisplaySetDisplayPropertiesFunction() {}
36 virtual bool RunImpl() OVERRIDE; 32 virtual bool RunImpl() OVERRIDE;
37
38 private:
39 void OnPropertiesSet(bool success, const std::string& error);
40 }; 33 };
41 34
42 } // namespace extensions 35 } // namespace extensions
43 36
44 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_ 37 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_DISPLAY_SYSTEM_DISPLAY_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698