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 #include "ash/display/display_change_observer_chromeos.h" | 5 #include "ash/display/display_change_observer_chromeos.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "ash/ash_switches.h" | 12 #include "ash/ash_switches.h" |
13 #include "ash/display/display_info.h" | 13 #include "ash/display/display_info.h" |
14 #include "ash/display/display_layout_store.h" | 14 #include "ash/display/display_layout_store.h" |
15 #include "ash/display/display_manager.h" | 15 #include "ash/display/display_manager.h" |
16 #include "ash/shell.h" | 16 #include "ash/shell.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "grit/ash_strings.h" | 19 #include "grit/ash_strings.h" |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
21 #include "ui/base/x/x11_util.h" | 21 #include "ui/base/x/x11_util.h" |
22 #include "ui/compositor/dip_util.h" | 22 #include "ui/compositor/dip_util.h" |
23 #include "ui/display/chromeos/display_mode.h" | 23 #include "ui/display/chromeos/display_mode.h" |
24 #include "ui/display/chromeos/display_snapshot.h" | 24 #include "ui/display/chromeos/display_snapshot.h" |
25 #include "ui/gfx/display.h" | 25 #include "ui/gfx/display.h" |
26 | 26 |
27 namespace ash { | 27 namespace ash { |
28 namespace internal { | |
29 | 28 |
30 using ui::OutputConfigurator; | 29 using ui::OutputConfigurator; |
31 | 30 |
32 namespace { | 31 namespace { |
33 | 32 |
34 // The DPI threshold to detect high density screen. | 33 // The DPI threshold to detect high density screen. |
35 // Higher DPI than this will use device_scale_factor=2. | 34 // Higher DPI than this will use device_scale_factor=2. |
36 const unsigned int kHighDensityDPIThreshold = 170; | 35 const unsigned int kHighDensityDPIThreshold = 170; |
37 | 36 |
38 // 1 inch in mm. | 37 // 1 inch in mm. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } | 175 } |
177 | 176 |
178 void DisplayChangeObserver::OnAppTerminating() { | 177 void DisplayChangeObserver::OnAppTerminating() { |
179 #if defined(USE_ASH) | 178 #if defined(USE_ASH) |
180 // Stop handling display configuration events once the shutdown | 179 // Stop handling display configuration events once the shutdown |
181 // process starts. crbug.com/177014. | 180 // process starts. crbug.com/177014. |
182 Shell::GetInstance()->output_configurator()->PrepareForExit(); | 181 Shell::GetInstance()->output_configurator()->PrepareForExit(); |
183 #endif | 182 #endif |
184 } | 183 } |
185 | 184 |
186 } // namespace internal | |
187 } // namespace ash | 185 } // namespace ash |
OLD | NEW |