Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DISPLAY_INFO_PROVIDER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_DISPLAY_INFO_PROVIDER_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_DISPLAY_INFO_PROVIDER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_DISPLAY_INFO_PROVIDER_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "extensions/browser/api/system_display/display_info_provider.h" | 12 #include "extensions/browser/api/system_display/display_info_provider.h" |
| 13 | 13 |
| 14 namespace chromeos { | 14 namespace chromeos { |
| 15 class OverscanCalibrator; | 15 class OverscanCalibrator; |
| 16 class TouchCalibratorController; | |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace extensions { | 19 namespace extensions { |
| 19 | 20 |
| 20 class DisplayInfoProviderChromeOS : public DisplayInfoProvider { | 21 class DisplayInfoProviderChromeOS : public DisplayInfoProvider { |
| 21 public: | 22 public: |
| 22 DisplayInfoProviderChromeOS(); | 23 DisplayInfoProviderChromeOS(); |
| 23 ~DisplayInfoProviderChromeOS() override; | 24 ~DisplayInfoProviderChromeOS() override; |
| 24 | 25 |
| 25 // DisplayInfoProvider implementation. | 26 // DisplayInfoProvider implementation. |
| 26 bool SetInfo(const std::string& display_id, | 27 bool SetInfo(const std::string& display_id, |
| 27 const api::system_display::DisplayProperties& info, | 28 const api::system_display::DisplayProperties& info, |
| 28 std::string* error) override; | 29 std::string* error) override; |
| 29 bool SetDisplayLayout(const DisplayLayoutList& layouts) override; | 30 bool SetDisplayLayout(const DisplayLayoutList& layouts) override; |
| 30 void UpdateDisplayUnitInfoForPlatform( | 31 void UpdateDisplayUnitInfoForPlatform( |
| 31 const display::Display& display, | 32 const display::Display& display, |
| 32 api::system_display::DisplayUnitInfo* unit) override; | 33 api::system_display::DisplayUnitInfo* unit) override; |
| 33 void EnableUnifiedDesktop(bool enable) override; | 34 void EnableUnifiedDesktop(bool enable) override; |
| 34 DisplayUnitInfoList GetAllDisplaysInfo() override; | 35 DisplayUnitInfoList GetAllDisplaysInfo() override; |
| 35 DisplayLayoutList GetDisplayLayout() override; | 36 DisplayLayoutList GetDisplayLayout() override; |
| 36 bool OverscanCalibrationStart(const std::string& id) override; | 37 bool OverscanCalibrationStart(const std::string& id) override; |
| 37 bool OverscanCalibrationAdjust( | 38 bool OverscanCalibrationAdjust( |
| 38 const std::string& id, | 39 const std::string& id, |
| 39 const api::system_display::Insets& delta) override; | 40 const api::system_display::Insets& delta) override; |
| 40 bool OverscanCalibrationReset(const std::string& id) override; | 41 bool OverscanCalibrationReset(const std::string& id) override; |
| 41 bool OverscanCalibrationComplete(const std::string& id) override; | 42 bool OverscanCalibrationComplete(const std::string& id) override; |
| 43 bool TouchCalibrationSet( | |
| 44 const std::string& id, | |
| 45 const api::system_display::TouchCalibrationPairQuad& pairs, | |
| 46 const api::system_display::Bounds& bounds, | |
| 47 std::string* error) override; | |
| 48 bool TouchCalibrationReset(const std::string& id, | |
| 49 std::string* error) override; | |
| 42 | 50 |
| 43 private: | 51 private: |
| 44 std::map<std::string, std::unique_ptr<chromeos::OverscanCalibrator>> | 52 std::map<std::string, std::unique_ptr<chromeos::OverscanCalibrator>> |
| 45 overscan_calibrators_; | 53 overscan_calibrators_; |
| 46 | 54 |
| 47 chromeos::OverscanCalibrator* GetCalibrator(const std::string& id); | 55 std::unique_ptr<chromeos::TouchCalibratorController> touch_calibrator_; |
| 56 | |
| 57 chromeos::TouchCalibratorController* GetTouchCalibrator(); | |
| 58 | |
| 59 chromeos::OverscanCalibrator* GetOverscanCalibrator(const std::string& id); | |
|
stevenjb
2016/12/27 19:37:27
nit: Order here should really be:
private methods
malaykeshav
2016/12/27 20:07:01
Done
| |
| 48 | 60 |
| 49 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProviderChromeOS); | 61 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProviderChromeOS); |
| 50 }; | 62 }; |
| 51 | 63 |
| 52 } // namespace extensions | 64 } // namespace extensions |
| 53 | 65 |
| 54 #endif // CHROME_BROWSER_EXTENSIONS_DISPLAY_INFO_PROVIDER_CHROMEOS_H_ | 66 #endif // CHROME_BROWSER_EXTENSIONS_DISPLAY_INFO_PROVIDER_CHROMEOS_H_ |
| OLD | NEW |