| OLD | NEW | 
|   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 <vector> |   8 #include <vector> | 
|   9  |   9  | 
|  10 #include "ash/ash_export.h" |  10 #include "ash/ash_export.h" | 
|  11 #include "ash/shell_observer.h" |  11 #include "ash/shell_observer.h" | 
|  12 #include "base/basictypes.h" |  12 #include "base/basictypes.h" | 
|  13 #include "ui/display/chromeos/display_configurator.h" |  13 #include "ui/display/chromeos/display_configurator.h" | 
|  14 #include "ui/events/devices/input_device_event_observer.h" |  14 #include "ui/events/devices/input_device_event_observer.h" | 
|  15  |  15  | 
|  16 namespace ash { |  16 namespace ash { | 
|  17  |  17  | 
|  18 class DisplayInfo; |  18 class DisplayInfo; | 
|  19 struct DisplayMode; |  19 struct DisplayMode; | 
 |  20 class DisplaySnapshot; | 
|  20  |  21  | 
|  21 // An object that observes changes in display configuration and |  22 // An object that observes changes in display configuration and | 
|  22 // update DisplayManagers. |  23 // update DisplayManagers. | 
|  23 class DisplayChangeObserver : public ui::DisplayConfigurator::StateController, |  24 class DisplayChangeObserver : public ui::DisplayConfigurator::StateController, | 
|  24                               public ui::DisplayConfigurator::Observer, |  25                               public ui::DisplayConfigurator::Observer, | 
|  25                               public ui::InputDeviceEventObserver, |  26                               public ui::InputDeviceEventObserver, | 
|  26                               public ShellObserver { |  27                               public ShellObserver { | 
|  27  public: |  28  public: | 
|  28   // Returns the mode list for internal display. |  29   // Returns the mode list for internal display. | 
|  29   ASH_EXPORT static std::vector<DisplayMode> GetInternalDisplayModeList( |  30   ASH_EXPORT static std::vector<DisplayMode> GetInternalDisplayModeList( | 
|  30       const DisplayInfo& display_info, |  31       const DisplayInfo& display_info, | 
|  31       const ui::DisplayConfigurator::DisplayState& output); |  32       const ui::DisplaySnapshot& output); | 
|  32  |  33  | 
|  33   // Returns the resolution list. |  34   // Returns the resolution list. | 
|  34   ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList( |  35   ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList( | 
|  35       const ui::DisplayConfigurator::DisplayState& output); |  36       const ui::DisplaySnapshot& output); | 
|  36  |  37  | 
|  37   DisplayChangeObserver(); |  38   DisplayChangeObserver(); | 
|  38   ~DisplayChangeObserver() override; |  39   ~DisplayChangeObserver() override; | 
|  39  |  40  | 
|  40   // ui::DisplayConfigurator::StateController overrides: |  41   // ui::DisplayConfigurator::StateController overrides: | 
|  41   ui::MultipleDisplayState GetStateForDisplayIds( |  42   ui::MultipleDisplayState GetStateForDisplayIds( | 
|  42       const std::vector<int64>& outputs) const override; |  43       const std::vector<int64>& outputs) const override; | 
|  43   bool GetResolutionForDisplayId(int64 display_id, |  44   bool GetResolutionForDisplayId(int64 display_id, | 
|  44                                  gfx::Size* size) const override; |  45                                  gfx::Size* size) const override; | 
|  45  |  46  | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
|  59   // Exposed for testing. |  60   // Exposed for testing. | 
|  60   ASH_EXPORT static float FindDeviceScaleFactor(float dpi); |  61   ASH_EXPORT static float FindDeviceScaleFactor(float dpi); | 
|  61  |  62  | 
|  62  private: |  63  private: | 
|  63   DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver); |  64   DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver); | 
|  64 }; |  65 }; | 
|  65  |  66  | 
|  66 }  // namespace ash |  67 }  // namespace ash | 
|  67  |  68  | 
|  68 #endif  // ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_ |  69 #endif  // ASH_DISPLAY_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H_ | 
| OLD | NEW |