| OLD | NEW | 
|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/window_sizer.h" | 5 #include "chrome/browser/window_sizer.h" | 
| 6 | 6 | 
| 7 #include "chrome/browser/browser.h" |  | 
| 8 #include "chrome/browser/browser_list.h" | 7 #include "chrome/browser/browser_list.h" | 
| 9 #include "chrome/browser/browser_window.h" | 8 #include "chrome/browser/browser_window.h" | 
|  | 9 #include "chrome/browser/ui/browser.h" | 
| 10 | 10 | 
| 11 // How much horizontal and vertical offset there is between newly | 11 // How much horizontal and vertical offset there is between newly | 
| 12 // opened windows. | 12 // opened windows. | 
| 13 const int WindowSizer::kWindowTilePixels = 10; | 13 const int WindowSizer::kWindowTilePixels = 10; | 
| 14 | 14 | 
| 15 // An implementation of WindowSizer::MonitorInfoProvider that gets the actual | 15 // An implementation of WindowSizer::MonitorInfoProvider that gets the actual | 
| 16 // monitor information from Windows. | 16 // monitor information from Windows. | 
| 17 class DefaultMonitorInfoProvider : public WindowSizer::MonitorInfoProvider { | 17 class DefaultMonitorInfoProvider : public WindowSizer::MonitorInfoProvider { | 
| 18  public: | 18  public: | 
| 19   DefaultMonitorInfoProvider() { } | 19   DefaultMonitorInfoProvider() { } | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 99       // Adjust corner to now overflow the work area left and top edges, so | 99       // Adjust corner to now overflow the work area left and top edges, so | 
| 100       // that if a popup does not fit the title-bar is remains visible. | 100       // that if a popup does not fit the title-bar is remains visible. | 
| 101       corner = gfx::Point( | 101       corner = gfx::Point( | 
| 102           std::max(corner.x(), limit.x()), | 102           std::max(corner.x(), limit.x()), | 
| 103           std::max(corner.y(), limit.y()) | 103           std::max(corner.y(), limit.y()) | 
| 104       ); | 104       ); | 
| 105     } | 105     } | 
| 106   } | 106   } | 
| 107   return corner; | 107   return corner; | 
| 108 } | 108 } | 
| OLD | NEW | 
|---|