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

Side by Side Diff: ash/system/screen_layout_observer.cc

Issue 2874963002: chromeos: wireup more display management for mushrome (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 current_display_mode_ = DisplayMode::UNIFIED; 351 current_display_mode_ = DisplayMode::UNIFIED;
352 else if (IsDockedModeEnabled()) 352 else if (IsDockedModeEnabled())
353 current_display_mode_ = DisplayMode::DOCKED; 353 current_display_mode_ = DisplayMode::DOCKED;
354 else if (GetDisplayManager()->GetNumDisplays() > 2) 354 else if (GetDisplayManager()->GetNumDisplays() > 2)
355 current_display_mode_ = DisplayMode::EXTENDED_3_PLUS; 355 current_display_mode_ = DisplayMode::EXTENDED_3_PLUS;
356 else if (GetDisplayManager()->GetNumDisplays() == 2) 356 else if (GetDisplayManager()->GetNumDisplays() == 2)
357 current_display_mode_ = DisplayMode::EXTENDED_2; 357 current_display_mode_ = DisplayMode::EXTENDED_2;
358 else 358 else
359 current_display_mode_ = DisplayMode::SINGLE; 359 current_display_mode_ = DisplayMode::SINGLE;
360 360
361 if (!show_notifications_for_testing) 361 if (!show_notifications_for_testing_)
362 return; 362 return;
363 363
364 base::string16 message; 364 base::string16 message;
365 base::string16 additional_message; 365 base::string16 additional_message;
366 if (GetDisplayMessageForNotification(old_info, &message, &additional_message)) 366 if (GetDisplayMessageForNotification(old_info, &message, &additional_message))
367 CreateOrUpdateNotification(message, additional_message); 367 CreateOrUpdateNotification(message, additional_message);
368 } 368 }
369 369
370 bool ScreenLayoutObserver::GetExitMirrorModeMessage( 370 bool ScreenLayoutObserver::GetExitMirrorModeMessage(
371 base::string16* out_message, 371 base::string16* out_message,
(...skipping 22 matching lines...) Expand all
394 return true; 394 return true;
395 395
396 default: 396 default:
397 // 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.
398 // extended mode is on, ... etc. 398 // extended mode is on, ... etc.
399 return false; 399 return false;
400 } 400 }
401 } 401 }
402 402
403 } // namespace ash 403 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698