| 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> |
| 9 #include <memory> |
| 10 |
| 8 #include "base/macros.h" | 11 #include "base/macros.h" |
| 9 #include "extensions/browser/api/system_display/display_info_provider.h" | 12 #include "extensions/browser/api/system_display/display_info_provider.h" |
| 10 | 13 |
| 14 namespace chromeos { |
| 15 class OverscanCalibrator; |
| 16 } |
| 17 |
| 11 namespace extensions { | 18 namespace extensions { |
| 12 | 19 |
| 13 class DisplayInfoProviderChromeOS : public DisplayInfoProvider { | 20 class DisplayInfoProviderChromeOS : public DisplayInfoProvider { |
| 14 public: | 21 public: |
| 15 DisplayInfoProviderChromeOS(); | 22 DisplayInfoProviderChromeOS(); |
| 16 ~DisplayInfoProviderChromeOS() override; | 23 ~DisplayInfoProviderChromeOS() override; |
| 17 | 24 |
| 18 // DisplayInfoProvider implementation. | 25 // DisplayInfoProvider implementation. |
| 19 bool SetInfo(const std::string& display_id, | 26 bool SetInfo(const std::string& display_id, |
| 20 const api::system_display::DisplayProperties& info, | 27 const api::system_display::DisplayProperties& info, |
| 21 std::string* error) override; | 28 std::string* error) override; |
| 22 void UpdateDisplayUnitInfoForPlatform( | 29 void UpdateDisplayUnitInfoForPlatform( |
| 23 const display::Display& display, | 30 const display::Display& display, |
| 24 api::system_display::DisplayUnitInfo* unit) override; | 31 api::system_display::DisplayUnitInfo* unit) override; |
| 25 void EnableUnifiedDesktop(bool enable) override; | 32 void EnableUnifiedDesktop(bool enable) override; |
| 26 DisplayUnitInfoList GetAllDisplaysInfo() override; | 33 DisplayUnitInfoList GetAllDisplaysInfo() override; |
| 34 bool OverscanCalibrationStart(const std::string& id) override; |
| 35 bool OverscanCalibrationAdjust( |
| 36 const std::string& id, |
| 37 const api::system_display::Insets& delta) override; |
| 38 bool OverscanCalibrationReset(const std::string& id) override; |
| 39 bool OverscanCalibrationComplete(const std::string& id) override; |
| 27 | 40 |
| 28 private: | 41 private: |
| 42 std::map<std::string, std::unique_ptr<chromeos::OverscanCalibrator>> |
| 43 overscan_calibrators_; |
| 44 |
| 45 chromeos::OverscanCalibrator* GetCalibrator(const std::string& id); |
| 46 |
| 29 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProviderChromeOS); | 47 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProviderChromeOS); |
| 30 }; | 48 }; |
| 31 | 49 |
| 32 } // namespace extensions | 50 } // namespace extensions |
| 33 | 51 |
| 34 #endif // CHROME_BROWSER_EXTENSIONS_DISPLAY_INFO_PROVIDER_CHROMEOS_H_ | 52 #endif // CHROME_BROWSER_EXTENSIONS_DISPLAY_INFO_PROVIDER_CHROMEOS_H_ |
| OLD | NEW |