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

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

Issue 2874963002: chromeos: wireup more display management for mushrome (Closed)
Patch Set: better comment 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
« no previous file with comments | « ash/system/screen_layout_observer.h ('k') | ash/test/ash_test_helper.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 (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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 current_display_mode_ = DisplayMode::UNIFIED; 363 current_display_mode_ = DisplayMode::UNIFIED;
364 else if (IsDockedModeEnabled()) 364 else if (IsDockedModeEnabled())
365 current_display_mode_ = DisplayMode::DOCKED; 365 current_display_mode_ = DisplayMode::DOCKED;
366 else if (GetDisplayManager()->GetNumDisplays() > 2) 366 else if (GetDisplayManager()->GetNumDisplays() > 2)
367 current_display_mode_ = DisplayMode::EXTENDED_3_PLUS; 367 current_display_mode_ = DisplayMode::EXTENDED_3_PLUS;
368 else if (GetDisplayManager()->GetNumDisplays() == 2) 368 else if (GetDisplayManager()->GetNumDisplays() == 2)
369 current_display_mode_ = DisplayMode::EXTENDED_2; 369 current_display_mode_ = DisplayMode::EXTENDED_2;
370 else 370 else
371 current_display_mode_ = DisplayMode::SINGLE; 371 current_display_mode_ = DisplayMode::SINGLE;
372 372
373 if (!show_notifications_for_testing) 373 if (!show_notifications_for_testing_)
374 return; 374 return;
375 375
376 base::string16 message; 376 base::string16 message;
377 base::string16 additional_message; 377 base::string16 additional_message;
378 if (GetDisplayMessageForNotification(old_info, &message, &additional_message)) 378 if (GetDisplayMessageForNotification(old_info, &message, &additional_message))
379 CreateOrUpdateNotification(message, additional_message); 379 CreateOrUpdateNotification(message, additional_message);
380 } 380 }
381 381
382 bool ScreenLayoutObserver::GetExitMirrorModeMessage( 382 bool ScreenLayoutObserver::GetExitMirrorModeMessage(
383 base::string16* out_message, 383 base::string16* out_message,
(...skipping 22 matching lines...) Expand all
406 return true; 406 return true;
407 407
408 default: 408 default:
409 // Mirror mode was turned off; other messages should be shown e.g. 409 // Mirror mode was turned off; other messages should be shown e.g.
410 // extended mode is on, ... etc. 410 // extended mode is on, ... etc.
411 return false; 411 return false;
412 } 412 }
413 } 413 }
414 414
415 } // namespace ash 415 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/screen_layout_observer.h ('k') | ash/test/ash_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698