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

Side by Side Diff: chrome/browser/cocoa/page_info_window_controller.h

Issue 536086: Mac: Save/restore task manager window pos and size. (Closed)
Patch Set: comments Created 10 years, 11 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) 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 6
7 #include "base/scoped_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 9
10 class PageInfoWindowMac; 10 class PageInfoWindowMac;
11 class PrefService; 11 class PrefService;
12 @class WindowSizeAutosaver;
12 13
13 // This NSWindowController subclass implements the Cocoa window for 14 // This NSWindowController subclass implements the Cocoa window for
14 // PageInfoWindow. This creates and owns the PageInfoWindowMac subclass. 15 // PageInfoWindow. This creates and owns the PageInfoWindowMac subclass.
15 16
16 @interface PageInfoWindowController : NSWindowController { 17 @interface PageInfoWindowController : NSWindowController {
17 @private 18 @private
18 // We load both images and then we share the refs with our UI elements. 19 // We load both images and then we share the refs with our UI elements.
19 scoped_nsobject<NSImage> goodImg_; 20 scoped_nsobject<NSImage> goodImg_;
20 scoped_nsobject<NSImage> badImg_; 21 scoped_nsobject<NSImage> badImg_;
21 22
22 // User interface item values. The NIB uses KVO to get these, so the values 23 // User interface item values. The NIB uses KVO to get these, so the values
23 // are not explicitly set in the view by the controller. 24 // are not explicitly set in the view by the controller.
24 NSImage* identityImg_; 25 NSImage* identityImg_;
25 NSImage* connectionImg_; 26 NSImage* connectionImg_;
26 NSImage* historyImg_; 27 NSImage* historyImg_;
27 NSString* identityMsg_; 28 NSString* identityMsg_;
28 NSString* connectionMsg_; 29 NSString* connectionMsg_;
29 NSString* historyMsg_; 30 NSString* historyMsg_;
30 BOOL enableCertButton_; 31 BOOL enableCertButton_;
31 32
32 // Box that allows us to show/hide the history information. 33 // Box that allows us to show/hide the history information.
33 IBOutlet NSBox* historyBox_; 34 IBOutlet NSBox* historyBox_;
34 35
35 // Bridge to Chromium that we own. 36 // Bridge to Chromium that we own.
36 scoped_ptr<PageInfoWindowMac> pageInfo_; 37 scoped_ptr<PageInfoWindowMac> pageInfo_;
38
39 scoped_nsobject<WindowSizeAutosaver> sizeSaver_;
37 } 40 }
38 41
39 @property(readwrite, retain) NSImage* identityImg; 42 @property(readwrite, retain) NSImage* identityImg;
40 @property(readwrite, retain) NSImage* connectionImg; 43 @property(readwrite, retain) NSImage* connectionImg;
41 @property(readwrite, retain) NSImage* historyImg; 44 @property(readwrite, retain) NSImage* historyImg;
42 @property(readwrite, copy) NSString* identityMsg; 45 @property(readwrite, copy) NSString* identityMsg;
43 @property(readwrite, copy) NSString* connectionMsg; 46 @property(readwrite, copy) NSString* connectionMsg;
44 @property(readwrite, copy) NSString* historyMsg; 47 @property(readwrite, copy) NSString* historyMsg;
45 @property(readwrite) BOOL enableCertButton; 48 @property(readwrite) BOOL enableCertButton;
46 49
47 // Sets the bridge between Cocoa and Chromium. 50 // Sets the bridge between Cocoa and Chromium.
48 - (void)setPageInfo:(PageInfoWindowMac*)pageInfo; 51 - (void)setPageInfo:(PageInfoWindowMac*)pageInfo;
49 52
50 // Returns the good and bad image refs. 53 // Returns the good and bad image refs.
51 - (NSImage*)goodImg; 54 - (NSImage*)goodImg;
52 - (NSImage*)badImg; 55 - (NSImage*)badImg;
53 56
54 // Shows the certificate display window 57 // Shows the certificate display window
55 - (IBAction)showCertWindow:(id)sender; 58 - (IBAction)showCertWindow:(id)sender;
56 59
57 // Sets whether or not to show or hide the history box. This will resize the 60 // Sets whether or not to show or hide the history box. This will resize the
58 // frame of the window. 61 // frame of the window.
59 - (void)setShowHistoryBox:(BOOL)show; 62 - (void)setShowHistoryBox:(BOOL)show;
60 63
61 @end 64 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698