Make ShadowBorder use ShadowValue.
[chromium-blink-merge.git] / ash / display / display_change_observer_chromeos.h
blob228adb275d7a97278c3e93ca261cdf9a6b3b3a42
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 <vector>
10 #include "ash/ash_export.h"
11 #include "ash/shell_observer.h"
12 #include "base/basictypes.h"
13 #include "ui/display/chromeos/display_configurator.h"
14 #include "ui/events/devices/input_device_event_observer.h"
16 namespace ash {
18 class DisplayInfo;
19 struct DisplayMode;
21 // An object that observes changes in display configuration and
22 // update DisplayManagers.
23 class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
24 public ui::DisplayConfigurator::Observer,
25 public ui::InputDeviceEventObserver,
26 public ShellObserver {
27 public:
28 // Returns the mode list for internal display.
29 ASH_EXPORT static std::vector<DisplayMode> GetInternalDisplayModeList(
30 const DisplayInfo& display_info,
31 const ui::DisplayConfigurator::DisplayState& output);
33 // Returns the resolution list.
34 ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList(
35 const ui::DisplayConfigurator::DisplayState& output);
37 DisplayChangeObserver();
38 ~DisplayChangeObserver() override;
40 // ui::DisplayConfigurator::StateController overrides:
41 ui::MultipleDisplayState GetStateForDisplayIds(
42 const std::vector<int64>& outputs) const override;
43 bool GetResolutionForDisplayId(int64 display_id,
44 gfx::Size* size) const override;
46 // Overriden from ui::DisplayConfigurator::Observer:
47 void OnDisplayModeChanged(
48 const ui::DisplayConfigurator::DisplayStateList& outputs) override;
50 // Overriden from ui::InputDeviceEventObserver:
51 void OnTouchscreenDeviceConfigurationChanged() override;
52 void OnKeyboardDeviceConfigurationChanged() override;
53 void OnMouseDeviceConfigurationChanged() override;
54 void OnTouchpadDeviceConfigurationChanged() override;
56 // Overriden from ShellObserver:
57 void OnAppTerminating() override;
59 // Exposed for testing.
60 ASH_EXPORT static float FindDeviceScaleFactor(float dpi);
62 private:
63 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
66 } // namespace ash
68 #endif // ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_