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

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

Issue 417113012: Introduce user customization of external HighDPI mode for 4K monitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 4 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
« no previous file with comments | « no previous file | ash/display/display_change_observer_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 12
13 namespace ash { 13 namespace ash {
14 14
15 class DisplayInfo;
15 struct DisplayMode; 16 struct DisplayMode;
16 17
17 // An object that observes changes in display configuration and 18 // An object that observes changes in display configuration and
18 // update DisplayManagers. 19 // update DisplayManagers.
19 class DisplayChangeObserver : public ui::DisplayConfigurator::StateController, 20 class DisplayChangeObserver : public ui::DisplayConfigurator::StateController,
20 public ui::DisplayConfigurator::Observer, 21 public ui::DisplayConfigurator::Observer,
21 public ShellObserver { 22 public ShellObserver {
22 public: 23 public:
24 // Returns the mode list for internal display.
25 ASH_EXPORT static std::vector<DisplayMode> GetInternalDisplayModeList(
26 const DisplayInfo& display_info,
27 const ui::DisplayConfigurator::DisplayState& output);
28
23 // Returns the resolution list. 29 // Returns the resolution list.
24 ASH_EXPORT static std::vector<DisplayMode> GetDisplayModeList( 30 ASH_EXPORT static std::vector<DisplayMode> GetExternalDisplayModeList(
25 const ui::DisplayConfigurator::DisplayState& output); 31 const ui::DisplayConfigurator::DisplayState& output);
26 32
27 DisplayChangeObserver(); 33 DisplayChangeObserver();
28 virtual ~DisplayChangeObserver(); 34 virtual ~DisplayChangeObserver();
29 35
30 // ui::DisplayConfigurator::StateController overrides: 36 // ui::DisplayConfigurator::StateController overrides:
31 virtual ui::MultipleDisplayState GetStateForDisplayIds( 37 virtual ui::MultipleDisplayState GetStateForDisplayIds(
32 const std::vector<int64>& outputs) const OVERRIDE; 38 const std::vector<int64>& outputs) const OVERRIDE;
33 virtual bool GetResolutionForDisplayId(int64 display_id, 39 virtual bool GetResolutionForDisplayId(int64 display_id,
34 gfx::Size* size) const OVERRIDE; 40 gfx::Size* size) const OVERRIDE;
35 41
36 // Overriden from ui::DisplayConfigurator::Observer: 42 // Overriden from ui::DisplayConfigurator::Observer:
37 virtual void OnDisplayModeChanged( 43 virtual void OnDisplayModeChanged(
38 const ui::DisplayConfigurator::DisplayStateList& outputs) OVERRIDE; 44 const ui::DisplayConfigurator::DisplayStateList& outputs) OVERRIDE;
39 45
40 // Overriden from ShellObserver: 46 // Overriden from ShellObserver:
41 virtual void OnAppTerminating() OVERRIDE; 47 virtual void OnAppTerminating() OVERRIDE;
42 48
43 // Exposed for testing. 49 // Exposed for testing.
44 ASH_EXPORT static float FindDeviceScaleFactor(float dpi); 50 ASH_EXPORT static float FindDeviceScaleFactor(float dpi);
45 51
46 private: 52 private:
47 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver); 53 DISALLOW_COPY_AND_ASSIGN(DisplayChangeObserver);
48 }; 54 };
49 55
50 } // namespace ash 56 } // namespace ash
51 57
52 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H 58 #endif // ASH_DISPLAY_AURA_DISPLAY_CHANGE_OBSERVER_CHROMEOS_H
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_change_observer_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698