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: chrome/browser/cocoa/window_size_autosaver.mm

Issue 3203008: Move prefs-related files under chrome/browser/ into a prefs/ subdir. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 6
7 #import "chrome/browser/cocoa/window_size_autosaver.h" 7 #import "chrome/browser/cocoa/window_size_autosaver.h"
8 8
9 #include "chrome/browser/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 10
11 // If the window width stored in the prefs is smaller than this, the size is 11 // If the window width stored in the prefs is smaller than this, the size is
12 // not restored but instead cleared from the profile -- to protect users from 12 // not restored but instead cleared from the profile -- to protect users from
13 // accidentally making their windows very small and then not finding them again. 13 // accidentally making their windows very small and then not finding them again.
14 const int kMinWindowWidth = 101; 14 const int kMinWindowWidth = 101;
15 15
16 // Minimum restored window height, see |kMinWindowWidth|. 16 // Minimum restored window height, see |kMinWindowWidth|.
17 const int kMinWindowHeight = 17; 17 const int kMinWindowHeight = 17;
18 18
19 @interface WindowSizeAutosaver (Private) 19 @interface WindowSizeAutosaver (Private)
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 !windowPrefs->GetInteger("y", &y)) 99 !windowPrefs->GetInteger("y", &y))
100 return; // Nothing stored. 100 return; // Nothing stored.
101 // Turn the origin (lower-left) into an upper-left window point. 101 // Turn the origin (lower-left) into an upper-left window point.
102 NSPoint upperLeft = NSMakePoint(x, y + NSHeight([window_ frame])); 102 NSPoint upperLeft = NSMakePoint(x, y + NSHeight([window_ frame]));
103 [window_ cascadeTopLeftFromPoint:upperLeft]; 103 [window_ cascadeTopLeftFromPoint:upperLeft];
104 } 104 }
105 } 105 }
106 106
107 @end 107 @end
108 108
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698