| 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
| 7 #include "chrome/browser/ui/browser_list.h" | 7 #include "chrome/browser/ui/browser_list.h" |
| 8 #include "chrome/browser/ui/browser_window.h" | 8 #include "chrome/browser/ui/browser_window.h" |
| 9 #include "chrome/browser/window_sizer.h" | 9 #include "chrome/browser/ui/window_sizer.h" |
| 10 | 10 |
| 11 | 11 |
| 12 // How much horizontal and vertical offset there is between newly | 12 // How much horizontal and vertical offset there is between newly |
| 13 // opened windows. | 13 // opened windows. |
| 14 const int WindowSizer::kWindowTilePixels = 22; | 14 const int WindowSizer::kWindowTilePixels = 22; |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 class DefaultMonitorInfoProvider : public WindowSizer::MonitorInfoProvider { | 18 class DefaultMonitorInfoProvider : public WindowSizer::MonitorInfoProvider { |
| 19 public: | 19 public: |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 NSMinY(work_area) + size.height())); | 135 NSMinY(work_area) + size.height())); |
| 136 | 136 |
| 137 // Adjust corner to now overflow the work area left and top edges, so | 137 // Adjust corner to now overflow the work area left and top edges, so |
| 138 // that if a popup does not fit the title-bar is remains visible. | 138 // that if a popup does not fit the title-bar is remains visible. |
| 139 corner = NSMakePoint(std::max(corner.x, limit.x), | 139 corner = NSMakePoint(std::max(corner.x, limit.x), |
| 140 std::min(corner.y, limit.y)); | 140 std::min(corner.y, limit.y)); |
| 141 } | 141 } |
| 142 | 142 |
| 143 return gfx::Point(corner.x, NSHeight(main_area) - corner.y); | 143 return gfx::Point(corner.x, NSHeight(main_area) - corner.y); |
| 144 } | 144 } |
| OLD | NEW |