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

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

Issue 17704003: Create RootWindowTransformer after root window's bounds and scale factor are updated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/display/display_controller_unittest.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/display/display_controller.h" 5 #include "ash/display/display_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 10
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 814
815 void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) { 815 void DisplayController::OnDisplayBoundsChanged(const gfx::Display& display) {
816 if (limiter_) 816 if (limiter_)
817 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs); 817 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs);
818 const internal::DisplayInfo& display_info = 818 const internal::DisplayInfo& display_info =
819 GetDisplayManager()->GetDisplayInfo(display.id()); 819 GetDisplayManager()->GetDisplayInfo(display.id());
820 DCHECK(!display_info.bounds_in_pixel().IsEmpty()); 820 DCHECK(!display_info.bounds_in_pixel().IsEmpty());
821 821
822 UpdateDisplayBoundsForLayout(); 822 UpdateDisplayBoundsForLayout();
823 aura::RootWindow* root = root_windows_[display.id()]; 823 aura::RootWindow* root = root_windows_[display.id()];
824 root->SetHostBounds(display_info.bounds_in_pixel());
824 SetDisplayPropertiesOnHostWindow(root, display); 825 SetDisplayPropertiesOnHostWindow(root, display);
825 root->SetHostBounds(display_info.bounds_in_pixel());
826 } 826 }
827 827
828 void DisplayController::OnDisplayAdded(const gfx::Display& display) { 828 void DisplayController::OnDisplayAdded(const gfx::Display& display) {
829 if (limiter_) 829 if (limiter_)
830 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs); 830 limiter_->SetThrottleTimeout(kAfterDisplayChangeThrottleTimeoutMs);
831 831
832 if (primary_root_window_for_replace_) { 832 if (primary_root_window_for_replace_) {
833 DCHECK(root_windows_.empty()); 833 DCHECK(root_windows_.empty());
834 primary_display_id = display.id(); 834 primary_display_id = display.id();
835 root_windows_[display.id()] = primary_root_window_for_replace_; 835 root_windows_[display.id()] = primary_root_window_for_replace_;
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 for (size_t i = 0; i < root_windows.size(); ++i) { 1014 for (size_t i = 0; i < root_windows.size(); ++i) {
1015 std::string name = 1015 std::string name =
1016 root_windows[i] == primary ? "aura_root_0" : "aura_root_x"; 1016 root_windows[i] == primary ? "aura_root_0" : "aura_root_x";
1017 gfx::AcceleratedWidget xwindow = root_windows[i]->GetAcceleratedWidget(); 1017 gfx::AcceleratedWidget xwindow = root_windows[i]->GetAcceleratedWidget();
1018 XStoreName(ui::GetXDisplay(), xwindow, name.c_str()); 1018 XStoreName(ui::GetXDisplay(), xwindow, name.c_str());
1019 } 1019 }
1020 #endif 1020 #endif
1021 } 1021 }
1022 1022
1023 } // namespace ash 1023 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/display_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698