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

Side by Side Diff: ash/display/display_change_observer_chromeos.h

Issue 336863002: Moving input device hotplug event processing outside of ui/display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H 5 #ifndef ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
6 #define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H 6 #define ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shell_observer.h" 9 #include "ash/shell_observer.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/display/chromeos/display_configurator.h" 11 #include "ui/display/chromeos/display_configurator.h"
12 #include "ui/events/input_device_event_observer.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 class DisplayInfo; 16 class DisplayInfo;
16 struct DisplayMode; 17 struct DisplayMode;
17 18
18 // An object that observes changes in display configuration and 19 // An object that observes changes in display configuration and
19 // update DisplayManagers. 20 // update DisplayManagers.
20 class DisplayChangeObserver : public ui::DisplayConfigurator::StateController, 21 class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
21 public ui::DisplayConfigurator::Observer, 22 public ui::DisplayConfigurator::Observer,
23 public ui::InputDeviceEventObserver,
22 public ShellObserver { 24 public ShellObserver {
23 public: 25 public:
24 // Returns the mode list for internal display. 26 // Returns the mode list for internal display.
25 ASH_EXPORT static std::vector<DisplayMode> GetInternalDisplayModeList( 27 ASH_EXPORT static std::vector<DisplayMode> GetInternalDisplayModeList(
26 const DisplayInfo& display_info, 28 const DisplayInfo& display_info,
27 const ui::DisplayConfigurator::DisplayState& output); 29 const ui::DisplayConfigurator::DisplayState& output);
28 30
29 // Returns the resolution list. 31 // Returns the resolution list.
30 ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList( 32 ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList(
31 const ui::DisplayConfigurator::DisplayState& output); 33 const ui::DisplayConfigurator::DisplayState& output);
32 34
33 DisplayChangeObserver(); 35 DisplayChangeObserver();
34 virtual ~DisplayChangeObserver(); 36 virtual ~DisplayChangeObserver();
35 37
36 // ui::DisplayConfigurator::StateController overrides: 38 // ui::DisplayConfigurator::StateController overrides:
37 virtual ui::MultipleDisplayState GetStateForDisplayIds( 39 virtual ui::MultipleDisplayState GetStateForDisplayIds(
38 const std::vector<int64>& outputs) const OVERRIDE; 40 const std::vector<int64>& outputs) const OVERRIDE;
39 virtual bool GetResolutionForDisplayId(int64 display_id, 41 virtual bool GetResolutionForDisplayId(int64 display_id,
40 gfx::Size* size) const OVERRIDE; 42 gfx::Size* size) const OVERRIDE;
41 43
42 // Overriden from ui::DisplayConfigurator::Observer: 44 // Overriden from ui::DisplayConfigurator::Observer:
43 virtual void OnDisplayModeChanged( 45 virtual void OnDisplayModeChanged(
44 const ui::DisplayConfigurator::DisplayStateList& outputs) OVERRIDE; 46 const ui::DisplayConfigurator::DisplayStateList& outputs) OVERRIDE;
45 47
48 // Overriden from ui::InputDeviceEventObserver:
49 virtual void OnInputDeviceConfigurationChanged() OVERRIDE;
50
46 // Overriden from ShellObserver: 51 // Overriden from ShellObserver:
47 virtual void OnAppTerminating() OVERRIDE; 52 virtual void OnAppTerminating() OVERRIDE;
48 53
49 // Exposed for testing. 54 // Exposed for testing.
50 ASH_EXPORT static float FindDeviceScaleFactor(float dpi); 55 ASH_EXPORT static float FindDeviceScaleFactor(float dpi);
51 56
52 private: 57 private:
53 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver); 58 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
54 }; 59 };
55 60
56 } // namespace ash 61 } // namespace ash
57 62
58 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H 63 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698