OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <stdio.h> | 5 #include <stdio.h> |
6 #include <string> | 6 #include <string> |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "ash/display/display_info.h" | 9 #include "ash/display/display_info.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 // Copy overscan_insets_in_dip_ if it's not empty. This is for test | 173 // Copy overscan_insets_in_dip_ if it's not empty. This is for test |
174 // cases which use "/o" annotation which sets the overscan inset | 174 // cases which use "/o" annotation which sets the overscan inset |
175 // to native, and that overscan has to be propagated. This does not | 175 // to native, and that overscan has to be propagated. This does not |
176 // happen on the real environment. | 176 // happen on the real environment. |
177 if (!native_info.overscan_insets_in_dip_.empty()) | 177 if (!native_info.overscan_insets_in_dip_.empty()) |
178 overscan_insets_in_dip_ = native_info.overscan_insets_in_dip_; | 178 overscan_insets_in_dip_ = native_info.overscan_insets_in_dip_; |
179 | 179 |
180 // Rotation_ and ui_scale_ are given by preference, or unit | 180 // Rotation_ and ui_scale_ are given by preference, or unit |
181 // tests. Don't copy if this native_info came from | 181 // tests. Don't copy if this native_info came from |
182 // DisplayChangeObserverX11. | 182 // DisplayChangeObserver. |
183 if (!native_info.native()) { | 183 if (!native_info.native()) { |
184 rotation_ = native_info.rotation_; | 184 rotation_ = native_info.rotation_; |
185 ui_scale_ = native_info.ui_scale_; | 185 ui_scale_ = native_info.ui_scale_; |
186 } | 186 } |
187 // Don't copy insets as it may be given by preference. |rotation_| | 187 // Don't copy insets as it may be given by preference. |rotation_| |
188 // is treated as a native so that it can be specified in | 188 // is treated as a native so that it can be specified in |
189 // |CreateFromSpec|. | 189 // |CreateFromSpec|. |
190 } | 190 } |
191 | 191 |
192 void DisplayInfo::SetBounds(const gfx::Rect& new_bounds_in_pixel) { | 192 void DisplayInfo::SetBounds(const gfx::Rect& new_bounds_in_pixel) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 resolutions_str += ","; | 243 resolutions_str += ","; |
244 resolutions_str += iter->size.ToString(); | 244 resolutions_str += iter->size.ToString(); |
245 if (iter->interlaced) | 245 if (iter->interlaced) |
246 resolutions_str += "(i)"; | 246 resolutions_str += "(i)"; |
247 } | 247 } |
248 return ToString() + ", resolutions=" + resolutions_str; | 248 return ToString() + ", resolutions=" + resolutions_str; |
249 } | 249 } |
250 | 250 |
251 } // namespace internal | 251 } // namespace internal |
252 } // namespace ash | 252 } // namespace ash |
OLD | NEW |