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

Side by Side Diff: chrome/browser/chromeos/display/display_preferences.h

Issue 2540383002: Updates display manager and display preferences to handle touch calibration data. (Closed)
Patch Set: Merge with ToT Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_
6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ 6 #define CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <array>
9 10
10 #include "third_party/cros_system_api/dbus/service_constants.h" 11 #include "third_party/cros_system_api/dbus/service_constants.h"
11 #include "ui/display/display_layout.h" 12 #include "ui/display/display_layout.h"
12 13
13 class PrefRegistrySimple; 14 class PrefRegistrySimple;
14 15
16 namespace gfx {
17 class Point;
18 }
19
15 namespace chromeos { 20 namespace chromeos {
16 21
17 // Registers the prefs associated with display settings and stored 22 // Registers the prefs associated with display settings and stored
18 // into Local State. 23 // into Local State.
19 void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry); 24 void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry);
20 25
21 // Stores the current displays prefereces (both primary display id and 26 // Stores the current displays prefereces (both primary display id and
22 // dispay layout). 27 // dispay layout).
23 void StoreDisplayPrefs(); 28 void StoreDisplayPrefs();
24 29
25 // If there is an internal display, stores |rotation_lock| along with the 30 // If there is an internal display, stores |rotation_lock| along with the
26 // current rotation of the internal display. Otherwise no data is stored. 31 // current rotation of the internal display. Otherwise no data is stored.
27 void StoreDisplayRotationPrefs(bool rotation_lock); 32 void StoreDisplayRotationPrefs(bool rotation_lock);
28 33
29 // Load display preferences from Local Store. |first_run_after_boot| is used 34 // Load display preferences from Local Store. |first_run_after_boot| is used
30 // determine if a certain preference should be applied at boot time or 35 // determine if a certain preference should be applied at boot time or
31 // restart. 36 // restart.
32 void LoadDisplayPreferences(bool first_run_after_boot); 37 void LoadDisplayPreferences(bool first_run_after_boot);
33 38
34 // Stores the display layout for given display pairs for tests. 39 // Stores the display layout for given display pairs for tests.
35 void StoreDisplayLayoutPrefForTest(const display::DisplayIdList& list, 40 void StoreDisplayLayoutPrefForTest(const display::DisplayIdList& list,
36 const display::DisplayLayout& layout); 41 const display::DisplayLayout& layout);
37 42
38 // Stores the given |power_state| for tests. 43 // Stores the given |power_state| for tests.
39 void StoreDisplayPowerStateForTest(DisplayPowerState power_state); 44 void StoreDisplayPowerStateForTest(DisplayPowerState power_state);
40 45
46 // Parses the marshalled string data stored in local preferences for calibration
47 // points and populates |point_pair_quad| using the unmarshalled data.
48 // See TouchCalibrationData in Managed display info.
49 bool ParseTouchCalibrationStringForTest(
50 const std::string& str,
51 std::array<std::pair<gfx::Point, gfx::Point>, 4>* point_pair_quad);
52
41 } // namespace chromeos 53 } // namespace chromeos
42 54
43 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_ 55 #endif // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_
OLDNEW
« no previous file with comments | « ash/display/display_manager_unittest.cc ('k') | chrome/browser/chromeos/display/display_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698