diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 13:07:19 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-11 13:07:19 +0000 |
commit | b913a3acaaebf26e54ca13dc37e3c21527e841f3 (patch) | |
tree | deeb025f24a5709d9272e3da45b558f27cb4eb2d /ash/display | |
parent | ff1779bcb9314565caab15f8bfb44e57d9744b33 (diff) | |
download | chromium_src-b913a3acaaebf26e54ca13dc37e3c21527e841f3.zip chromium_src-b913a3acaaebf26e54ca13dc37e3c21527e841f3.tar.gz chromium_src-b913a3acaaebf26e54ca13dc37e3c21527e841f3.tar.bz2 |
- Show app list on 2nd launcher
- Share the launcher mode/delegate in multiple launchers.
This CL moves the launcher mode/delegate to Shell
- Initialize Display objects before creating RootWindow
for 2nd as it'll be used during creation.
I'll add tests in next CL, as it crashes without https://codereview.chromium.org/11515004/.
BUG=145978
TEST=none
Review URL: https://chromiumcodereview.appspot.com/11465037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display')
-rw-r--r-- | ash/display/display_controller.cc | 4 | ||||
-rw-r--r-- | ash/display/display_manager.cc | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc index 16328fc..2fce25a 100644 --- a/ash/display/display_controller.cc +++ b/ash/display/display_controller.cc @@ -470,11 +470,11 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) { DCHECK(!root_windows_.empty()); NotifyDisplayConfigurationChanging(); aura::RootWindow* root = AddRootWindowForDisplay(display); - Shell::GetInstance()->InitRootWindowForSecondaryDisplay(root); UpdateDisplayBoundsForLayout(); - if (desired_primary_display_id_ == display.id()) SetPrimaryDisplay(display); + + Shell::GetInstance()->InitRootWindowForSecondaryDisplay(root); } void DisplayController::OnDisplayRemoved(const gfx::Display& display) { diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc index e14d39a..572f91a 100644 --- a/ash/display/display_manager.cc +++ b/ash/display/display_manager.cc @@ -447,8 +447,14 @@ void DisplayManager::CycleDisplayImpl() { std::vector<gfx::Display> new_displays; new_displays.push_back(DisplayController::GetPrimaryDisplay()); // Add if there is only one display. - if (displays_.size() == 1) - new_displays.push_back(aura::CreateDisplayFromSpec("100+200-500x400")); + if (displays_.size() == 1) { + // Layout the 2nd display below the primary as with the real device. + aura::RootWindow* primary = Shell::GetPrimaryRootWindow(); + gfx::Rect host_bounds = + gfx::Rect(primary->GetHostOrigin(), primary->GetHostSize()); + new_displays.push_back(aura::CreateDisplayFromSpec( + StringPrintf("%d+%d-500x400", host_bounds.x(), host_bounds.bottom()))); + } OnNativeDisplaysChanged(new_displays); } |