Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: extensions/browser/api/system_display/display_info_provider.h

Issue 2002773002: Add overscanCalibration methods to system_display.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix non-chromeos + tests Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 display { 15 namespace display {
16 class Display; 16 class Display;
17 } 17 }
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 namespace api { 21 namespace api {
22 namespace system_display { 22 namespace system_display {
23 struct DisplayProperties; 23 struct DisplayProperties;
24 struct DisplayUnitInfo; 24 struct DisplayUnitInfo;
25 struct Insets;
25 } 26 }
26 } 27 }
27 28
28 typedef std::vector<api::system_display::DisplayUnitInfo> DisplayUnitInfoList; 29 typedef std::vector<api::system_display::DisplayUnitInfo> DisplayUnitInfoList;
29 30
30 class DisplayInfoProvider { 31 class DisplayInfoProvider {
31 public: 32 public:
32 virtual ~DisplayInfoProvider(); 33 virtual ~DisplayInfoProvider();
33 34
34 // Returns a pointer to DisplayInfoProvider or NULL if Create() 35 // Returns a pointer to DisplayInfoProvider or NULL if Create()
(...skipping 10 matching lines...) Expand all
45 virtual bool SetInfo(const std::string& display_id, 46 virtual bool SetInfo(const std::string& display_id,
46 const api::system_display::DisplayProperties& info, 47 const api::system_display::DisplayProperties& info,
47 std::string* error) = 0; 48 std::string* error) = 0;
48 49
49 // Enable the unified desktop feature. 50 // Enable the unified desktop feature.
50 virtual void EnableUnifiedDesktop(bool enable); 51 virtual void EnableUnifiedDesktop(bool enable);
51 52
52 // Get display information. 53 // Get display information.
53 virtual DisplayUnitInfoList GetAllDisplaysInfo(); 54 virtual DisplayUnitInfoList GetAllDisplaysInfo();
54 55
56 // Implement overscan calbiration methods. See system_display.idl. These
57 // return false if |id| is invalid.
58 virtual bool OverscanCalibrationStart(const std::string& id);
59 virtual bool OverscanCalibrationAdjust(
60 const std::string& id,
61 const api::system_display::Insets& delta);
62 virtual bool OverscanCalibrationReset(const std::string& id);
63 virtual bool OverscanCalibrationComplete(const std::string& id);
64
55 protected: 65 protected:
56 DisplayInfoProvider(); 66 DisplayInfoProvider();
57 67
58 // Create a DisplayUnitInfo from a display::Display for implementations of 68 // Create a DisplayUnitInfo from a display::Display for implementations of
59 // GetAllDisplaysInfo() 69 // GetAllDisplaysInfo()
60 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo( 70 static api::system_display::DisplayUnitInfo CreateDisplayUnitInfo(
61 const display::Display& display, 71 const display::Display& display,
62 int64_t primary_display_id); 72 int64_t primary_display_id);
63 73
64 private: 74 private:
65 static DisplayInfoProvider* Create(); 75 static DisplayInfoProvider* Create();
66 76
67 // Update the content of the |unit| obtained for |display| using 77 // Update the content of the |unit| obtained for |display| using
68 // platform specific method. 78 // platform specific method.
69 virtual void UpdateDisplayUnitInfoForPlatform( 79 virtual void UpdateDisplayUnitInfoForPlatform(
70 const display::Display& display, 80 const display::Display& display,
71 api::system_display::DisplayUnitInfo* unit) = 0; 81 api::system_display::DisplayUnitInfo* unit) = 0;
72 82
73 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider); 83 DISALLOW_COPY_AND_ASSIGN(DisplayInfoProvider);
74 }; 84 };
75 85
76 } // namespace extensions 86 } // namespace extensions
77 87
78 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_ 88 #endif // EXTENSIONS_BROWSER_API_SYSTEM_DISPLAY_DISPLAY_INFO_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698