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

Side by Side Diff: ash/display/display_manager.cc

Issue 570303003: ash: Avoid treating screen resizes as user activity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check that UserActivityDetector exists Created 6 years, 3 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/display/display_change_observer_chromeos.cc ('k') | no next file » | 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/display/display_manager.h" 5 #include "ash/display/display_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 "ChromeOS.Display.ColorProfile", profile, ui::NUM_COLOR_PROFILES); 647 "ChromeOS.Display.ColorProfile", profile, ui::NUM_COLOR_PROFILES);
648 } 648 }
649 if (delegate_) 649 if (delegate_)
650 delegate_->PostDisplayConfigurationChange(); 650 delegate_->PostDisplayConfigurationChange();
651 #endif 651 #endif
652 } 652 }
653 653
654 void DisplayManager::OnNativeDisplaysChanged( 654 void DisplayManager::OnNativeDisplaysChanged(
655 const std::vector<DisplayInfo>& updated_displays) { 655 const std::vector<DisplayInfo>& updated_displays) {
656 if (updated_displays.empty()) { 656 if (updated_displays.empty()) {
657 VLOG(1) << "OnNativeDisplayChanged(0): # of current displays=" 657 VLOG(1) << "OnNativeDisplaysChanged(0): # of current displays="
658 << displays_.size(); 658 << displays_.size();
659 // If the device is booted without display, or chrome is started 659 // If the device is booted without display, or chrome is started
660 // without --ash-host-window-bounds on linux desktop, use the 660 // without --ash-host-window-bounds on linux desktop, use the
661 // default display. 661 // default display.
662 if (displays_.empty()) { 662 if (displays_.empty()) {
663 std::vector<DisplayInfo> init_displays; 663 std::vector<DisplayInfo> init_displays;
664 init_displays.push_back(DisplayInfo::CreateFromSpec(std::string())); 664 init_displays.push_back(DisplayInfo::CreateFromSpec(std::string()));
665 MaybeInitInternalDisplay(init_displays[0].id()); 665 MaybeInitInternalDisplay(init_displays[0].id());
666 OnNativeDisplaysChanged(init_displays); 666 OnNativeDisplaysChanged(init_displays);
667 } else { 667 } else {
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 new_secondary_origin.Offset(-secondary_bounds.width(), offset); 1259 new_secondary_origin.Offset(-secondary_bounds.width(), offset);
1260 break; 1260 break;
1261 } 1261 }
1262 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); 1262 gfx::Insets insets = secondary_display->GetWorkAreaInsets();
1263 secondary_display->set_bounds( 1263 secondary_display->set_bounds(
1264 gfx::Rect(new_secondary_origin, secondary_bounds.size())); 1264 gfx::Rect(new_secondary_origin, secondary_bounds.size()));
1265 secondary_display->UpdateWorkAreaFromInsets(insets); 1265 secondary_display->UpdateWorkAreaFromInsets(insets);
1266 } 1266 }
1267 1267
1268 } // namespace ash 1268 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_change_observer_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698