[Mac] The profile name field shouldn't be multi line because that's silly.
[chromium-blink-merge.git] / ash / display / display_change_observer_chromeos.h
blob905db78b324296c46d978a231da9e6f42d16ca9b
1 // Copyright 2013 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.
5 #ifndef ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
6 #define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
8 #include "ash/ash_export.h"
9 #include "ash/shell_observer.h"
10 #include "base/basictypes.h"
11 #include "ui/display/chromeos/display_configurator.h"
12 #include "ui/events/input_device_event_observer.h"
14 namespace ash {
16 class DisplayInfo;
17 struct DisplayMode;
19 // An object that observes changes in display configuration and
20 // update DisplayManagers.
21 class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
22 public ui::DisplayConfigurator::Observer,
23 public ui::InputDeviceEventObserver,
24 public ShellObserver {
25 public:
26 // Returns the mode list for internal display.
27 ASH_EXPORT static std::vector<DisplayMode> GetInternalDisplayModeList(
28 const DisplayInfo& display_info,
29 const ui::DisplayConfigurator::DisplayState& output);
31 // Returns the resolution list.
32 ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList(
33 const ui::DisplayConfigurator::DisplayState& output);
35 DisplayChangeObserver();
36 virtual ~DisplayChangeObserver();
38 // ui::DisplayConfigurator::StateController overrides:
39 virtual ui::MultipleDisplayState GetStateForDisplayIds(
40 const std::vector<int64>& outputs) const override;
41 virtual bool GetResolutionForDisplayId(int64 display_id,
42 gfx::Size* size) const override;
44 // Overriden from ui::DisplayConfigurator::Observer:
45 virtual void OnDisplayModeChanged(
46 const ui::DisplayConfigurator::DisplayStateList& outputs) override;
48 // Overriden from ui::InputDeviceEventObserver:
49 virtual void OnInputDeviceConfigurationChanged() override;
51 // Overriden from ShellObserver:
52 virtual void OnAppTerminating() override;
54 // Exposed for testing.
55 ASH_EXPORT static float FindDeviceScaleFactor(float dpi);
57 private:
58 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
61 } // namespace ash
63 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H