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

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

Issue 10795080: A couple of multiple displays support fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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/multi_display_manager.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 "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/multi_display_manager.h" 8 #include "ash/display/multi_display_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_ash.h" 10 #include "ash/screen_ash.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 void DisplayController::InitSecondaryDisplays() { 58 void DisplayController::InitSecondaryDisplays() {
59 aura::DisplayManager* display_manager = 59 aura::DisplayManager* display_manager =
60 aura::Env::GetInstance()->display_manager(); 60 aura::Env::GetInstance()->display_manager();
61 for (size_t i = 1; i < display_manager->GetNumDisplays(); ++i) { 61 for (size_t i = 1; i < display_manager->GetNumDisplays(); ++i) {
62 const gfx::Display* display = display_manager->GetDisplayAt(i); 62 const gfx::Display* display = display_manager->GetDisplayAt(i);
63 aura::RootWindow* root = AddRootWindowForDisplay(*display); 63 aura::RootWindow* root = AddRootWindowForDisplay(*display);
64 Shell::GetInstance()->InitRootWindowForSecondaryDisplay(root); 64 Shell::GetInstance()->InitRootWindowForSecondaryDisplay(root);
65 } 65 }
66 UpdateDisplayBoundsForLayout();
66 } 67 }
67 68
68 aura::RootWindow* DisplayController::GetPrimaryRootWindow() { 69 aura::RootWindow* DisplayController::GetPrimaryRootWindow() {
69 DCHECK(!root_windows_.empty()); 70 DCHECK(!root_windows_.empty());
70 return root_windows_[0]; 71 return root_windows_[0];
71 } 72 }
72 73
73 aura::RootWindow* DisplayController::GetRootWindowForDisplayId(int id) { 74 aura::RootWindow* DisplayController::GetRootWindowForDisplayId(int id) {
74 return root_windows_[id]; 75 return root_windows_[id];
75 } 76 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 break; 288 break;
288 } 289 }
289 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); 290 gfx::Insets insets = secondary_display->GetWorkAreaInsets();
290 secondary_display->set_bounds( 291 secondary_display->set_bounds(
291 gfx::Rect(new_secondary_origin, secondary_bounds.size())); 292 gfx::Rect(new_secondary_origin, secondary_bounds.size()));
292 secondary_display->UpdateWorkAreaFromInsets(insets); 293 secondary_display->UpdateWorkAreaFromInsets(insets);
293 } 294 }
294 295
295 } // namespace internal 296 } // namespace internal
296 } // namespace ash 297 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/display/multi_display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698