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

Side by Side Diff: extensions/browser/api/system_display/display_info_provider.h

Issue 2538623002: Adds touch calibration methods to system_display.idl API (Closed)
Patch Set: Adds touch calibration methods to system.idl API Created 4 years 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 EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ 5 #ifndef EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
6 #define EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ 6 #define EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 14
15 namespace display { 15 namespace display {
16 class Display; 16 class Display;
17 } 17 }
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 namespace api { 21 namespace api {
22 namespace system_display { 22 namespace system_display {
23 struct Bounds;
23 struct DisplayLayout; 24 struct DisplayLayout;
24 struct DisplayProperties; 25 struct DisplayProperties;
25 struct DisplayUnitInfo; 26 struct DisplayUnitInfo;
26 struct Insets; 27 struct Insets;
28 struct TouchCalibrationPairQuad;
27 } 29 }
28 } 30 }
29 31
30 class DisplayInfoProvider { 32 class DisplayInfoProvider {
31 public: 33 public:
32 using DisplayUnitInfoList = std::vector<api::system_display::DisplayUnitInfo>; 34 using DisplayUnitInfoList = std::vector<api::system_display::DisplayUnitInfo>;
33 using DisplayLayoutList = std::vector<api::system_display::DisplayLayout>; 35 using DisplayLayoutList = std::vector<api::system_display::DisplayLayout>;
34 36
35 virtual ~DisplayInfoProvider(); 37 virtual ~DisplayInfoProvider();
36 38
(...skipping 27 matching lines...) Expand all
64 66
65 // Implements overscan calbiration methods. See system_display.idl. These 67 // Implements overscan calbiration methods. See system_display.idl. These
66 // return false if |id| is invalid. 68 // return false if |id| is invalid.
67 virtual bool OverscanCalibrationStart(const std::string& id); 69 virtual bool OverscanCalibrationStart(const std::string& id);
68 virtual bool OverscanCalibrationAdjust( 70 virtual bool OverscanCalibrationAdjust(
69 const std::string& id, 71 const std::string& id,
70 const api::system_display::Insets& delta); 72 const api::system_display::Insets& delta);
71 virtual bool OverscanCalibrationReset(const std::string& id); 73 virtual bool OverscanCalibrationReset(const std::string& id);
72 virtual bool OverscanCalibrationComplete(const std::string& id); 74 virtual bool OverscanCalibrationComplete(const std::string& id);
73 75
76 // Implements touch calibration methods. See system_display.idl. This returns
77 // false if |id| is invalid.
78 virtual bool TouchCalibrationStart(const std::string& id);
79 virtual bool TouchCalibrationSet(
80 const std::string& id,
81 const api::system_display::TouchCalibrationPairQuad& pairs,
82 const api::system_display::Bounds& bounds);
83 virtual bool TouchCalibrationReset(const std::string& id);
84 virtual bool IsTouchCalibrationActive(const std::string& id);
85
74 protected: 86 protected:
75 DisplayInfoProvider(); 87 DisplayInfoProvider();
76 88
77 // Create a DisplayUnitInfo from a display::Display for implementations of 89 // Create a DisplayUnitInfo from a display::Display for implementations of
78 // GetAllDisplaysInfo() 90 // GetAllDisplaysInfo()
79 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo( 91 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo(
80 const display::Display& display, 92 const display::Display& display,
81 int64_t primary_display_id); 93 int64_t primary_display_id);
82 94
83 private: 95 private:
84 static DisplayInfoProvider* Create(); 96 static DisplayInfoProvider* Create();
85 97
86 // Update the content of the |unit| obtained for |display| using 98 // Update the content of the |unit| obtained for |display| using
87 // platform specific method. 99 // platform specific method.
88 virtual void UpdateDisplayUnitInfoForPlatform( 100 virtual void UpdateDisplayUnitInfoForPlatform(
89 const display::Display& display, 101 const display::Display& display,
90 api::system_display::DisplayUnitInfo* unit) = 0; 102 api::system_display::DisplayUnitInfo* unit) = 0;
91 103
92 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); 104 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider);
93 }; 105 };
94 106
95 } // namespace extensions 107 } // namespace extensions
96 108
97 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ 109 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698