| 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_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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 // return false if |id| is invalid. | 68 // return false if |id| is invalid. |
| 69 virtual bool OverscanCalibrationStart(const std::string& id); | 69 virtual bool OverscanCalibrationStart(const std::string& id); |
| 70 virtual bool OverscanCalibrationAdjust( | 70 virtual bool OverscanCalibrationAdjust( |
| 71 const std::string& id, | 71 const std::string& id, |
| 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 StartNativeTouchCalibration(const std::string& id, |
| 79 virtual bool TouchCalibrationSet( | 79 std::string* error); |
| 80 const std::string& id, | 80 virtual bool StartCustomTouchCalibration(const std::string& id, |
| 81 std::string* error); |
| 82 virtual bool CompleteCustomTouchCalibration( |
| 81 const api::system_display::TouchCalibrationPairQuad& pairs, | 83 const api::system_display::TouchCalibrationPairQuad& pairs, |
| 82 const api::system_display::Bounds& bounds, | 84 const api::system_display::Bounds& bounds, |
| 83 std::string* error); | 85 std::string* error); |
| 84 virtual bool TouchCalibrationReset(const std::string& id, std::string* error); | 86 virtual bool ResetTouchCalibration(const std::string& id, std::string* error); |
| 85 virtual bool IsTouchCalibrationActive(std::string* error); | 87 virtual bool IsNativeTouchCalibrationActive(std::string* error); |
| 86 | 88 |
| 87 protected: | 89 protected: |
| 88 DisplayInfoProvider(); | 90 DisplayInfoProvider(); |
| 89 | 91 |
| 90 // Create a DisplayUnitInfo from a display::Display for implementations of | 92 // Create a DisplayUnitInfo from a display::Display for implementations of |
| 91 // GetAllDisplaysInfo() | 93 // GetAllDisplaysInfo() |
| 92 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo( | 94 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo( |
| 93 const display::Display& display, | 95 const display::Display& display, |
| 94 int64_t primary_display_id); | 96 int64_t primary_display_id); |
| 95 | 97 |
| 96 private: | 98 private: |
| 97 static DisplayInfoProvider* Create(); | 99 static DisplayInfoProvider* Create(); |
| 98 | 100 |
| 99 // Update the content of the |unit| obtained for |display| using | 101 // Update the content of the |unit| obtained for |display| using |
| 100 // platform specific method. | 102 // platform specific method. |
| 101 virtual void UpdateDisplayUnitInfoForPlatform( | 103 virtual void UpdateDisplayUnitInfoForPlatform( |
| 102 const display::Display& display, | 104 const display::Display& display, |
| 103 api::system_display::DisplayUnitInfo* unit) = 0; | 105 api::system_display::DisplayUnitInfo* unit) = 0; |
| 104 | 106 |
| 105 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); | 107 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); |
| 106 }; | 108 }; |
| 107 | 109 |
| 108 } // namespace extensions | 110 } // namespace extensions |
| 109 | 111 |
| 110 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ | 112 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ |
| OLD | NEW |