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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/manager/display_preferences.h
diff --git a/ui/display/manager/display_preferences.h b/ui/display/manager/display_preferences.h
new file mode 100644
index 0000000000000000000000000000000000000000..098ad089cd6c6b6f1a4eaaff48621384a4c0f3f7
--- /dev/null
+++ b/ui/display/manager/display_preferences.h
@@ -0,0 +1,65 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_DISPLAY_MANAGER_DISPLAY_PREFERENCES_H_
+#define UI_DISPLAY_MANAGER_DISPLAY_PREFERENCES_H_
+
+#include <stdint.h>
+#include <array>
+
+#include "services/preferences/public/cpp/pref_client_store.h"
+#include "third_party/cros_system_api/dbus/service_constants.h"
+#include "ui/display/display_layout.h"
+#include "ui/display/manager/chromeos/display_configurator.h"
+#include "ui/display/manager/display_manager.h"
+#include "ui/display/manager/display_manager_export.h"
+
+class PrefRegistrySimple;
+
+namespace gfx {
+class Point;
+}
+
+namespace display {
+
+// Registers the prefs associated with display settings and stored
+// into Local State.
+void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry);
+
+// Stores the current displays prefereces (both primary display id and
+// dispay layout).
+void StoreDisplayPrefs();
+
+// If there is an internal display, stores |rotation_lock| along with the
+// current rotation of the internal display. Otherwise no data is stored.
+void StoreDisplayRotationPrefs(bool rotation_lock);
+
+// Load display preferences from Local Store. |first_run_after_boot| is used
+// determine if a certain preference should be applied at boot time or
+// restart.
+// DISPLAY_MANAGER_EXPORT void LoadDisplayPreferences(bool first_run_after_boot,
+// DisplayConfigurator* display_configurator, DisplayManager* display_manager);
+DISPLAY_MANAGER_EXPORT void LoadDisplayPreferences(
+ bool first_run_after_boot,
+ DisplayConfigurator* display_configurator,
+ DisplayManager* display_manager,
+ preferences::PrefClientStore* pref_client_store_);
+
+// Stores the display layout for given display pairs for tests.
+void StoreDisplayLayoutPrefForTest(const display::DisplayIdList& list,
+ const display::DisplayLayout& layout);
+
+// Stores the given |power_state| for tests.
+void StoreDisplayPowerStateForTest(chromeos::DisplayPowerState power_state);
+
+// Parses the marshalled string data stored in local preferences for calibration
+// points and populates |point_pair_quad| using the unmarshalled data.
+// See TouchCalibrationData in Managed display info.
+DISPLAY_MANAGER_EXPORT bool ParseTouchCalibrationStringForTest(
+ const std::string& str,
+ std::array<std::pair<gfx::Point, gfx::Point>, 4>* point_pair_quad);
+
+} // namespace display
+
+#endif // UI_DISPLAY_MANAGER_DISPLAY_PREFERENCES_H_
« 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