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 #include "base/memory/linked_ptr.h" | 14 #include "base/memory/linked_ptr.h" |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Display; | 17 class Display; |
18 class Screen; | 18 class Screen; |
oshima
2016/01/20 06:40:12
remove this?
scottmg
2016/01/26 20:46:35
Done.
| |
19 } | 19 } |
20 | 20 |
21 namespace extensions { | 21 namespace extensions { |
22 | 22 |
23 namespace api { | 23 namespace api { |
24 namespace system_display { | 24 namespace system_display { |
25 struct DisplayProperties; | 25 struct DisplayProperties; |
26 struct DisplayUnitInfo; | 26 struct DisplayUnitInfo; |
27 } | 27 } |
28 } | 28 } |
(...skipping 13 matching lines...) Expand all Loading... | |
42 // Using this in other tests (e.g. unit_tests) will result in DCHECK failure. | 42 // Using this in other tests (e.g. unit_tests) will result in DCHECK failure. |
43 static void InitializeForTesting(DisplayInfoProvider* display_info_provider); | 43 static void InitializeForTesting(DisplayInfoProvider* display_info_provider); |
44 | 44 |
45 // Updates the display with |display_id| according to |info|. Returns whether | 45 // Updates the display with |display_id| according to |info|. Returns whether |
46 // the display was successfully updated. On failure, no display parameters | 46 // the display was successfully updated. On failure, no display parameters |
47 // should be changed, and |error| should be set to the error string. | 47 // should be changed, and |error| should be set to the error string. |
48 virtual bool SetInfo(const std::string& display_id, | 48 virtual bool SetInfo(const std::string& display_id, |
49 const api::system_display::DisplayProperties& info, | 49 const api::system_display::DisplayProperties& info, |
50 std::string* error) = 0; | 50 std::string* error) = 0; |
51 | 51 |
52 // Get the screen that is always active, which will be used for monitoring | |
53 // display changes events. | |
54 virtual gfx::Screen* GetActiveScreen() = 0; | |
55 | |
56 // Enable the unified desktop feature. | 52 // Enable the unified desktop feature. |
57 virtual void EnableUnifiedDesktop(bool enable); | 53 virtual void EnableUnifiedDesktop(bool enable); |
58 | 54 |
59 // Get display information. | 55 // Get display information. |
60 virtual DisplayInfo GetAllDisplaysInfo(); | 56 virtual DisplayInfo GetAllDisplaysInfo(); |
61 | 57 |
62 protected: | 58 protected: |
63 DisplayInfoProvider(); | 59 DisplayInfoProvider(); |
64 | 60 |
65 // Create a DisplayUnitInfo from a gfx::Display for implementations of | 61 // Create a DisplayUnitInfo from a gfx::Display for implementations of |
(...skipping 10 matching lines...) Expand all Loading... | |
76 virtual void UpdateDisplayUnitInfoForPlatform( | 72 virtual void UpdateDisplayUnitInfoForPlatform( |
77 const gfx::Display& display, | 73 const gfx::Display& display, |
78 api::system_display::DisplayUnitInfo* unit) = 0; | 74 api::system_display::DisplayUnitInfo* unit) = 0; |
79 | 75 |
80 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); | 76 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); |
81 }; | 77 }; |
82 | 78 |
83 } // namespace extensions | 79 } // namespace extensions |
84 | 80 |
85 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ | 81 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ |
OLD | NEW |