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

Side by Side Diff: ash/wm/base_layout_manager.cc

Issue 9689027: MonitorManager to manage multiple monitors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: crash fix Created 8 years, 9 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
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/wm/base_layout_manager.h" 5 #include "ash/wm/base_layout_manager.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/property_util.h" 8 #include "ash/wm/property_util.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SetChildBoundsDirect(child, child_bounds); 63 SetChildBoundsDirect(child, child_bounds);
64 } 64 }
65 65
66 ///////////////////////////////////////////////////////////////////////////// 66 /////////////////////////////////////////////////////////////////////////////
67 // BaseLayoutManager, RootWindowObserver overrides: 67 // BaseLayoutManager, RootWindowObserver overrides:
68 68
69 void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) { 69 void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) {
70 AdjustWindowSizesForScreenChange(); 70 AdjustWindowSizesForScreenChange();
71 } 71 }
72 72
73 void BaseLayoutManager::OnScreenWorkAreaInsetsChanged() { 73 void BaseLayoutManager::OnMonitorWorkAreaInsetsChanged() {
74 AdjustWindowSizesForScreenChange(); 74 AdjustWindowSizesForScreenChange();
75 } 75 }
76 76
77 ///////////////////////////////////////////////////////////////////////////// 77 /////////////////////////////////////////////////////////////////////////////
78 // BaseLayoutManager, WindowObserver overrides: 78 // BaseLayoutManager, WindowObserver overrides:
79 79
80 void BaseLayoutManager::OnWindowPropertyChanged(aura::Window* window, 80 void BaseLayoutManager::OnWindowPropertyChanged(aura::Window* window,
81 const void* key, 81 const void* key,
82 intptr_t old) { 82 intptr_t old) {
83 if (key == aura::client::kShowStateKey) 83 if (key == aura::client::kShowStateKey)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 gfx::Rect monitor_rect = wm::IsWindowFullscreen(window) ? 126 gfx::Rect monitor_rect = wm::IsWindowFullscreen(window) ?
127 gfx::Screen::GetMonitorAreaNearestWindow(window) : 127 gfx::Screen::GetMonitorAreaNearestWindow(window) :
128 gfx::Screen::GetMonitorWorkAreaNearestWindow(window); 128 gfx::Screen::GetMonitorWorkAreaNearestWindow(window);
129 // Put as much of the window as possible within the monitor area. 129 // Put as much of the window as possible within the monitor area.
130 window->SetBounds(window->bounds().AdjustToFit(monitor_rect)); 130 window->SetBounds(window->bounds().AdjustToFit(monitor_rect));
131 } 131 }
132 } 132 }
133 133
134 } // namespace internal 134 } // namespace internal
135 } // namespace ash 135 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698