Home | History | Annotate | Download | only in display
      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 
     11 class PrefRegistrySimple;
     12 
     13 namespace ash {
     14 struct DisplayLayout;
     15 }
     16 
     17 namespace gfx {
     18 class Display;
     19 class Insets;
     20 }
     21 
     22 namespace chromeos {
     23 
     24 // Registers the prefs associated with display settings and stored
     25 // into Local State.
     26 void RegisterDisplayLocalStatePrefs(PrefRegistrySimple* registry);
     27 
     28 // Stores the current displays prefereces (both primary display id and
     29 // dispay layout).
     30 void StoreDisplayPrefs();
     31 
     32 // If there is an internal display, stores |rotation_lock| along with the
     33 // current rotation of the internal display. Otherwise no data is stored.
     34 void StoreDisplayRotationPrefs(bool rotation_lock);
     35 
     36 // Sets the display layout for the current displays.
     37 void SetCurrentDisplayLayout(const ash::DisplayLayout& layout);
     38 
     39 // Load display preferences from Local Store. |first_run_after_boot| is used
     40 // determine if a certain preference should be applied at boot time or
     41 // restart.
     42 void LoadDisplayPreferences(bool first_run_after_boot);
     43 
     44 // Stores the display layout for given display pairs for tests.
     45 void StoreDisplayLayoutPrefForTest(int64 id1,
     46                                    int64 id2,
     47                                    const ash::DisplayLayout& layout);
     48 
     49 // Stores the given |power_state| for tests.
     50 void StoreDisplayPowerStateForTest(DisplayPowerState power_state);
     51 
     52 }  // namespace chromeos
     53 
     54 #endif  // CHROME_BROWSER_CHROMEOS_DISPLAY_DISPLAY_PREFERENCES_H_
     55