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

Side by Side Diff: chrome/browser/ui/window_sizer/window_sizer_mac.mm

Issue 10704022: browser: Move window sizer to subdir. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 "chrome/browser/ui/window_sizer.h" 5 #include "chrome/browser/ui/window_sizer/window_sizer.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/browser.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
11 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
12 12
13 // How much horizontal and vertical offset there is between newly 13 // How much horizontal and vertical offset there is between newly
14 // opened windows. 14 // opened windows.
15 const int WindowSizer::kWindowTilePixels = 22; 15 const int WindowSizer::kWindowTilePixels = 22;
(...skipping 16 matching lines...) Expand all
32 NSMinY(work_area) + size.height())); 32 NSMinY(work_area) + size.height()));
33 33
34 // Adjust corner to now overflow the work area left and top edges, so 34 // Adjust corner to now overflow the work area left and top edges, so
35 // that if a popup does not fit the title-bar is remains visible. 35 // that if a popup does not fit the title-bar is remains visible.
36 corner = NSMakePoint(std::max(corner.x, limit.x), 36 corner = NSMakePoint(std::max(corner.x, limit.x),
37 std::min(corner.y, limit.y)); 37 std::min(corner.y, limit.y));
38 } 38 }
39 39
40 return gfx::Point(corner.x, NSHeight(main_area) - corner.y); 40 return gfx::Point(corner.x, NSHeight(main_area) - corner.y);
41 } 41 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_gtk.cc ('k') | chrome/browser/ui/window_sizer/window_sizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698