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

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

Issue 2603563002: Plumbs touch calibration API to the display manager (Closed)
Patch Set: It works. The plumbing! Created 3 years, 11 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 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>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const api::system_display::Insets& delta); 72 const api::system_display::Insets& delta);
73 virtual bool OverscanCalibrationReset(const std::string& id); 73 virtual bool OverscanCalibrationReset(const std::string& id);
74 virtual bool OverscanCalibrationComplete(const std::string& id); 74 virtual bool OverscanCalibrationComplete(const std::string& id);
75 75
76 // Implements touch calibration methods. See system_display.idl. This returns 76 // Implements touch calibration methods. See system_display.idl. This returns
77 // false if |id| is invalid. 77 // false if |id| is invalid.
78 virtual bool TouchCalibrationStart(const std::string& id); 78 virtual bool TouchCalibrationStart(const std::string& id);
79 virtual bool TouchCalibrationSet( 79 virtual bool TouchCalibrationSet(
80 const std::string& id, 80 const std::string& id,
81 const api::system_display::TouchCalibrationPairQuad& pairs, 81 const api::system_display::TouchCalibrationPairQuad& pairs,
82 const api::system_display::Bounds& bounds); 82 const api::system_display::Bounds& bounds,
83 virtual bool TouchCalibrationReset(const std::string& id); 83 std::string* error);
84 virtual bool IsTouchCalibrationActive(const std::string& id); 84 virtual bool TouchCalibrationReset(const std::string& id, std::string* error);
85 virtual bool IsTouchCalibrationActive(std::string* error);
85 86
86 protected: 87 protected:
87 DisplayInfoProvider(); 88 DisplayInfoProvider();
88 89
89 // Create a DisplayUnitInfo from a display::Display for implementations of 90 // Create a DisplayUnitInfo from a display::Display for implementations of
90 // GetAllDisplaysInfo() 91 // GetAllDisplaysInfo()
91 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo( 92 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo(
92 const display::Display& display, 93 const display::Display& display,
93 int64_t primary_display_id); 94 int64_t primary_display_id);
94 95
95 private: 96 private:
96 static DisplayInfoProvider* Create(); 97 static DisplayInfoProvider* Create();
97 98
98 // Update the content of the |unit| obtained for |display| using 99 // Update the content of the |unit| obtained for |display| using
99 // platform specific method. 100 // platform specific method.
100 virtual void UpdateDisplayUnitInfoForPlatform( 101 virtual void UpdateDisplayUnitInfoForPlatform(
101 const display::Display& display, 102 const display::Display& display,
102 api::system_display::DisplayUnitInfo* unit) = 0; 103 api::system_display::DisplayUnitInfo* unit) = 0;
103 104
104 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); 105 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider);
105 }; 106 };
106 107
107 } // namespace extensions 108 } // namespace extensions
108 109
109 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ 110 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698