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

Side by Side Diff: ui/display/manager/display_preferences.h

Issue 2760453003: Work In Progess
Patch Set: convert local_state to use pre_client_store_ Created 3 years, 9 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
« no previous file with comments | « ui/display/manager/BUILD.gn ('k') | ui/display/manager/display_preferences.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_DISPLAY_MANAGER_DISPLAY_PREFERENCES_H_
6 #define UI_DISPLAY_MANAGER_DISPLAY_PREFERENCES_H_
7
8 #include <stdint.h>
9 #include <array>
10
11 #include "services/preferences/public/cpp/pref_client_store.h"
12 #include "third_party/cros_system_api/dbus/service_constants.h"
13 #include "ui/display/display_layout.h"
14 #include "ui/display/manager/chromeos/display_configurator.h"
15 #include "ui/display/manager/display_manager.h"
16 #include "ui/display/manager/display_manager_export.h"
17
18 class PrefRegistrySimple;
19
20 namespace gfx {
21 class Point;
22 }
23
24 namespace display {
25
26 // Registers the prefs associated with display settings and stored
27 // into Local State.
28 void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry);
29
30 // Stores the current displays prefereces (both primary display id and
31 // dispay layout).
32 void StoreDisplayPrefs();
33
34 // If there is an internal display, stores |rotation_lock| along with the
35 // current rotation of the internal display. Otherwise no data is stored.
36 void StoreDisplayRotationPrefs(bool rotation_lock);
37
38 // Load display preferences from Local Store. |first_run_after_boot| is used
39 // determine if a certain preference should be applied at boot time or
40 // restart.
41 // DISPLAY_MANAGER_EXPORT void LoadDisplayPreferences(bool first_run_after_boot,
42 // DisplayConfigurator* display_configurator, DisplayManager* display_manager);
43 DISPLAY_MANAGER_EXPORT void LoadDisplayPreferences(
44 bool first_run_after_boot,
45 DisplayConfigurator* display_configurator,
46 DisplayManager* display_manager,
47 preferences::PrefClientStore* pref_client_store_);
48
49 // Stores the display layout for given display pairs for tests.
50 void StoreDisplayLayoutPrefForTest(const display::DisplayIdList& list,
51 const display::DisplayLayout& layout);
52
53 // Stores the given |power_state| for tests.
54 void StoreDisplayPowerStateForTest(chromeos::DisplayPowerState power_state);
55
56 // Parses the marshalled string data stored in local preferences for calibration
57 // points and populates |point_pair_quad| using the unmarshalled data.
58 // See TouchCalibrationData in Managed display info.
59 DISPLAY_MANAGER_EXPORT bool ParseTouchCalibrationStringForTest(
60 const std::string& str,
61 std::array<std::pair<gfx::Point, gfx::Point>, 4>* point_pair_quad);
62
63 } // namespace display
64
65 #endif // UI_DISPLAY_MANAGER_DISPLAY_PREFERENCES_H_
OLDNEW
« no previous file with comments | « ui/display/manager/BUILD.gn ('k') | ui/display/manager/display_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698