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

Side by Side Diff: ash/display/multi_display_manager.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 | « ash/display/display_controller.cc ('k') | ash/display/multi_display_manager_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/multi_display_manager.h" 5 #include "ash/display/multi_display_manager.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/display/display_controller.h" 10 #include "ash/display/display_controller.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 DLOG(FATAL) << "Could not find display by id:" << id; 271 DLOG(FATAL) << "Could not find display by id:" << id;
272 return GetInvalidDisplay(); 272 return GetInvalidDisplay();
273 } 273 }
274 274
275 void MultiDisplayManager::AddDisplayFromSpec(const std::string& spec) { 275 void MultiDisplayManager::AddDisplayFromSpec(const std::string& spec) {
276 gfx::Display display = CreateDisplayFromSpec(spec); 276 gfx::Display display = CreateDisplayFromSpec(spec);
277 277
278 if (DisplayController::IsExtendedDesktopEnabled()) { 278 if (DisplayController::IsExtendedDesktopEnabled()) {
279 const gfx::Insets insets = display.GetWorkAreaInsets(); 279 const gfx::Insets insets = display.GetWorkAreaInsets();
280 const gfx::Rect& native_bounds = display.bounds_in_pixel(); 280 const gfx::Rect& native_bounds = display.bounds_in_pixel();
281 display.set_bounds( 281 display.SetScaleAndBounds(display.device_scale_factor(), native_bounds);
282 gfx::Rect(native_bounds.origin(), display.bounds().size()));
283 display.UpdateWorkAreaFromInsets(insets); 282 display.UpdateWorkAreaFromInsets(insets);
284 } 283 }
285 displays_.push_back(display); 284 displays_.push_back(display);
286 } 285 }
287 286
288 } // namespace internal 287 } // namespace internal
289 } // namespace ash 288 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_controller.cc ('k') | ash/display/multi_display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698