| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 @interface TaskManagerWindowController : NSWindowController { | 21 @interface TaskManagerWindowController : NSWindowController { |
| 22 @private | 22 @private |
| 23 IBOutlet NSTableView* tableView_; | 23 IBOutlet NSTableView* tableView_; |
| 24 IBOutlet NSButton* endProcessButton_; | 24 IBOutlet NSButton* endProcessButton_; |
| 25 TaskManagerMac* taskManagerObserver_; // weak | 25 TaskManagerMac* taskManagerObserver_; // weak |
| 26 TaskManager* taskManager_; // weak | 26 TaskManager* taskManager_; // weak |
| 27 TaskManagerModel* model_; // weak | 27 TaskManagerModel* model_; // weak |
| 28 | 28 |
| 29 scoped_nsobject<WindowSizeAutosaver> size_saver_; | 29 scoped_nsobject<WindowSizeAutosaver> size_saver_; |
| 30 | 30 |
| 31 // Contains a permutation of [0..|model_->ResourceCount() - 1|]. Used to | 31 // These contain a permutation of [0..|model_->ResourceCount() - 1|]. Used to |
| 32 // implement sorting. | 32 // implement sorting. |
| 33 std::vector<int> indexShuffle_; | 33 std::vector<int> viewToModelMap_; |
| 34 std::vector<int> modelToViewMap_; |
| 34 | 35 |
| 35 // Descriptor of the current sort column. | 36 // Descriptor of the current sort column. |
| 36 scoped_nsobject<NSSortDescriptor> currentSortDescriptor_; | 37 scoped_nsobject<NSSortDescriptor> currentSortDescriptor_; |
| 37 } | 38 } |
| 38 | 39 |
| 39 // Creates and shows the task manager's window. | 40 // Creates and shows the task manager's window. |
| 40 - (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver; | 41 - (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver; |
| 41 | 42 |
| 42 // Refreshes all data in the task manager table. | 43 // Refreshes all data in the task manager table. |
| 43 - (void)reloadData; | 44 - (void)reloadData; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 TableRowNSImageCache icon_cache_; | 105 TableRowNSImageCache icon_cache_; |
| 105 | 106 |
| 106 // An open task manager window. There can only be one open at a time. This | 107 // An open task manager window. There can only be one open at a time. This |
| 107 // is reset to NULL when the window is closed. | 108 // is reset to NULL when the window is closed. |
| 108 static TaskManagerMac* instance_; | 109 static TaskManagerMac* instance_; |
| 109 | 110 |
| 110 DISALLOW_COPY_AND_ASSIGN(TaskManagerMac); | 111 DISALLOW_COPY_AND_ASSIGN(TaskManagerMac); |
| 111 }; | 112 }; |
| 112 | 113 |
| 113 #endif // CHROME_BROWSER_COCOA_TASK_MANAGER_MAC_H_ | 114 #endif // CHROME_BROWSER_COCOA_TASK_MANAGER_MAC_H_ |
| OLD | NEW |