| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/system/screen_layout_observer.h" | 5 #include "ash/system/screen_layout_observer.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 return false; | 264 return false; |
| 265 } | 265 } |
| 266 | 266 |
| 267 if (iter.second.configured_ui_scale() != | 267 if (iter.second.configured_ui_scale() != |
| 268 old_iter->second.configured_ui_scale()) { | 268 old_iter->second.configured_ui_scale()) { |
| 269 *out_additional_message = l10n_util::GetStringFUTF16( | 269 *out_additional_message = l10n_util::GetStringFUTF16( |
| 270 IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED, | 270 IDS_ASH_STATUS_TRAY_DISPLAY_RESOLUTION_CHANGED, |
| 271 GetDisplayName(iter.first), GetDisplaySize(iter.first)); | 271 GetDisplayName(iter.first), GetDisplaySize(iter.first)); |
| 272 return true; | 272 return true; |
| 273 } | 273 } |
| 274 if (iter.second.GetActiveRotation() != | 274 // We don't show rotation change notification when the rotation source is |
| 275 old_iter->second.GetActiveRotation()) { | 275 // the accelerometer. |
| 276 if (iter.second.active_rotation_source() != |
| 277 display::Display::ROTATION_SOURCE_ACCELEROMETER && |
| 278 iter.second.GetActiveRotation() != |
| 279 old_iter->second.GetActiveRotation()) { |
| 276 int rotation_text_id = 0; | 280 int rotation_text_id = 0; |
| 277 switch (iter.second.GetActiveRotation()) { | 281 switch (iter.second.GetActiveRotation()) { |
| 278 case display::Display::ROTATE_0: | 282 case display::Display::ROTATE_0: |
| 279 rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_STANDARD_ORIENTATION; | 283 rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_STANDARD_ORIENTATION; |
| 280 break; | 284 break; |
| 281 case display::Display::ROTATE_90: | 285 case display::Display::ROTATE_90: |
| 282 rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90; | 286 rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_90; |
| 283 break; | 287 break; |
| 284 case display::Display::ROTATE_180: | 288 case display::Display::ROTATE_180: |
| 285 rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_180; | 289 rotation_text_id = IDS_ASH_STATUS_TRAY_DISPLAY_ORIENTATION_180; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 return true; | 394 return true; |
| 391 | 395 |
| 392 default: | 396 default: |
| 393 // Mirror mode was turned off; other messages should be shown e.g. | 397 // Mirror mode was turned off; other messages should be shown e.g. |
| 394 // extended mode is on, ... etc. | 398 // extended mode is on, ... etc. |
| 395 return false; | 399 return false; |
| 396 } | 400 } |
| 397 } | 401 } |
| 398 | 402 |
| 399 } // namespace ash | 403 } // namespace ash |
| OLD | NEW |