| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Display; | 16 class Display; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace display { |
| 20 using Display = gfx::Display; |
| 21 } |
| 22 |
| 19 namespace extensions { | 23 namespace extensions { |
| 20 | 24 |
| 21 namespace api { | 25 namespace api { |
| 22 namespace system_display { | 26 namespace system_display { |
| 23 struct DisplayProperties; | 27 struct DisplayProperties; |
| 24 struct DisplayUnitInfo; | 28 struct DisplayUnitInfo; |
| 25 } | 29 } |
| 26 } | 30 } |
| 27 | 31 |
| 28 typedef std::vector<api::system_display::DisplayUnitInfo> DisplayUnitInfoList; | 32 typedef std::vector<api::system_display::DisplayUnitInfo> DisplayUnitInfoList; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 48 | 52 |
| 49 // Enable the unified desktop feature. | 53 // Enable the unified desktop feature. |
| 50 virtual void EnableUnifiedDesktop(bool enable); | 54 virtual void EnableUnifiedDesktop(bool enable); |
| 51 | 55 |
| 52 // Get display information. | 56 // Get display information. |
| 53 virtual DisplayUnitInfoList GetAllDisplaysInfo(); | 57 virtual DisplayUnitInfoList GetAllDisplaysInfo(); |
| 54 | 58 |
| 55 protected: | 59 protected: |
| 56 DisplayInfoProvider(); | 60 DisplayInfoProvider(); |
| 57 | 61 |
| 58 // Create a DisplayUnitInfo from a gfx::Display for implementations of | 62 // Create a DisplayUnitInfo from a display::Display for implementations of |
| 59 // GetAllDisplaysInfo() | 63 // GetAllDisplaysInfo() |
| 60 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo( | 64 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo( |
| 61 const gfx::Display& display, | 65 const display::Display& display, |
| 62 int64_t primary_display_id); | 66 int64_t primary_display_id); |
| 63 | 67 |
| 64 private: | 68 private: |
| 65 static DisplayInfoProvider* Create(); | 69 static DisplayInfoProvider* Create(); |
| 66 | 70 |
| 67 // Update the content of the |unit| obtained for |display| using | 71 // Update the content of the |unit| obtained for |display| using |
| 68 // platform specific method. | 72 // platform specific method. |
| 69 virtual void UpdateDisplayUnitInfoForPlatform( | 73 virtual void UpdateDisplayUnitInfoForPlatform( |
| 70 const gfx::Display& display, | 74 const display::Display& display, |
| 71 api::system_display::DisplayUnitInfo* unit) = 0; | 75 api::system_display::DisplayUnitInfo* unit) = 0; |
| 72 | 76 |
| 73 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); | 77 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); |
| 74 }; | 78 }; |
| 75 | 79 |
| 76 } // namespace extensions | 80 } // namespace extensions |
| 77 | 81 |
| 78 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ | 82 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ |
| OLD | NEW |