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 CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_
6#define CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_
7
8#include "base/basictypes.h"
9#include "third_party/cros_system_api/dbus/service_constants.h"
10
11class PrefRegistrySimple;
12
13namespace ash {
14struct DisplayLayout;
15}
16
17namespace gfx {
18class Display;
19class Insets;
20}
21
22namespace chromeos {
23
24// Registers the prefs associated with display settings and stored
25// into Local State.
26void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry);
27
28// Stores the current displays prefereces (both primary display id and
29// dispay layout).
30void StoreDisplayPrefs();
31
32// Sets the display layout for the current displays.
33void SetCurrentDisplayLayout(const ash::DisplayLayout& layout);
34
35// Load display preferences from Local Store. |first_run_after_boot| is used
36// determine if a certain preference should be applied at boot time or
37// restart.
38void LoadDisplayPreferences(bool first_run_after_boot);
39
40// Stores the display layout for given display pairs for tests.
41void StoreDisplayLayoutPrefForTest(int64 id1,
42                                   int64 id2,
43                                   const ash::DisplayLayout& layout);
44
45// Stores the given |power_state| for tests.
46void StoreDisplayPowerStateForTest(DisplayPowerState power_state);
47
48}  // namespace chromeos
49
50#endif  // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_
51