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 #ifndef CHROME_BROWSER_COCOA_TASK_MANAGER_MAC_H_ | 5 #ifndef CHROME_BROWSER_COCOA_TASK_MANAGER_MAC_H_ |
6 #define CHROME_BROWSER_COCOA_TASK_MANAGER_MAC_H_ | 6 #define CHROME_BROWSER_COCOA_TASK_MANAGER_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 #include "base/scoped_nsobject.h" | 9 #include "base/scoped_nsobject.h" |
10 #include "chrome/browser/cocoa/table_row_nsimage_cache.h" | 10 #include "chrome/browser/cocoa/table_row_nsimage_cache.h" |
11 #include "chrome/browser/task_manager.h" | 11 #include "chrome/browser/task_manager.h" |
12 | 12 |
| 13 @class WindowSizeAutosaver; |
13 class TaskManagerMac; | 14 class TaskManagerMac; |
14 | 15 |
15 // This class is responsible for loading the task manager window and for | 16 // This class is responsible for loading the task manager window and for |
16 // managing it. | 17 // managing it. |
17 @interface TaskManagerWindowController : NSWindowController { | 18 @interface TaskManagerWindowController : NSWindowController { |
18 @private | 19 @private |
19 IBOutlet NSTableView* tableView_; | 20 IBOutlet NSTableView* tableView_; |
20 IBOutlet NSButton* endProcessButton_; | 21 IBOutlet NSButton* endProcessButton_; |
21 TaskManagerMac* taskManagerObserver_; // weak | 22 TaskManagerMac* taskManagerObserver_; // weak |
22 TaskManager* taskManager_; // weak | 23 TaskManager* taskManager_; // weak |
23 TaskManagerModel* model_; // weak | 24 TaskManagerModel* model_; // weak |
| 25 |
| 26 scoped_nsobject<WindowSizeAutosaver> size_saver_; |
24 } | 27 } |
25 | 28 |
26 // Creates and shows the task manager's window. | 29 // Creates and shows the task manager's window. |
27 - (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver; | 30 - (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver; |
28 | 31 |
29 // Refreshes all data in the task manager table. | 32 // Refreshes all data in the task manager table. |
30 - (void)reloadData; | 33 - (void)reloadData; |
31 | 34 |
32 // Callback for "Stats for nerds" link. | 35 // Callback for "Stats for nerds" link. |
33 - (IBAction)statsLinkClicked:(id)sender; | 36 - (IBAction)statsLinkClicked:(id)sender; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 TableRowNSImageCache icon_cache_; | 88 TableRowNSImageCache icon_cache_; |
86 | 89 |
87 // An open task manager window. There can only be one open at a time. This | 90 // An open task manager window. There can only be one open at a time. This |
88 // is reset to NULL when the window is closed. | 91 // is reset to NULL when the window is closed. |
89 static TaskManagerMac* instance_; | 92 static TaskManagerMac* instance_; |
90 | 93 |
91 DISALLOW_COPY_AND_ASSIGN(TaskManagerMac); | 94 DISALLOW_COPY_AND_ASSIGN(TaskManagerMac); |
92 }; | 95 }; |
93 | 96 |
94 #endif // CHROME_BROWSER_COCOA_TASK_MANAGER_MAC_H_ | 97 #endif // CHROME_BROWSER_COCOA_TASK_MANAGER_MAC_H_ |
OLD | NEW |