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

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: sync 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
« no previous file with comments | « ash/wm/base_layout_manager.h ('k') | ash/wm/base_layout_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/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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ///////////////////////////////////////////////////////////////////////////// 68 /////////////////////////////////////////////////////////////////////////////
69 // BaseLayoutManager, RootWindowObserver overrides: 69 // BaseLayoutManager, RootWindowObserver overrides:
70 70
71 void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) { 71 void BaseLayoutManager::OnRootWindowResized(const gfx::Size& new_size) {
72 AdjustWindowSizesForScreenChange(); 72 AdjustWindowSizesForScreenChange();
73 } 73 }
74 74
75 ///////////////////////////////////////////////////////////////////////////// 75 /////////////////////////////////////////////////////////////////////////////
76 // BaseLayoutManager, ash::ShellObserver overrides: 76 // BaseLayoutManager, ash::ShellObserver overrides:
77 77
78 void BaseLayoutManager::OnScreenWorkAreaInsetsChanged() { 78 void BaseLayoutManager::OnMonitorWorkAreaInsetsChanged() {
79 AdjustWindowSizesForScreenChange(); 79 AdjustWindowSizesForScreenChange();
80 } 80 }
81 81
82 ///////////////////////////////////////////////////////////////////////////// 82 /////////////////////////////////////////////////////////////////////////////
83 // BaseLayoutManager, WindowObserver overrides: 83 // BaseLayoutManager, WindowObserver overrides:
84 84
85 void BaseLayoutManager::OnWindowPropertyChanged(aura::Window* window, 85 void BaseLayoutManager::OnWindowPropertyChanged(aura::Window* window,
86 const void* key, 86 const void* key,
87 intptr_t old) { 87 intptr_t old) {
88 if (key == aura::client::kShowStateKey) 88 if (key == aura::client::kShowStateKey)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 gfx::Rect monitor_rect = wm::IsWindowFullscreen(window) ? 131 gfx::Rect monitor_rect = wm::IsWindowFullscreen(window) ?
132 gfx::Screen::GetMonitorAreaNearestWindow(window) : 132 gfx::Screen::GetMonitorAreaNearestWindow(window) :
133 gfx::Screen::GetMonitorWorkAreaNearestWindow(window); 133 gfx::Screen::GetMonitorWorkAreaNearestWindow(window);
134 // Put as much of the window as possible within the monitor area. 134 // Put as much of the window as possible within the monitor area.
135 window->SetBounds(window->bounds().AdjustToFit(monitor_rect)); 135 window->SetBounds(window->bounds().AdjustToFit(monitor_rect));
136 } 136 }
137 } 137 }
138 138
139 } // namespace internal 139 } // namespace internal
140 } // namespace ash 140 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/base_layout_manager.h ('k') | ash/wm/base_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698