| OLD | NEW |
| 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/cocoa/task_manager_mac.h" | 5 #include "chrome/browser/ui/cocoa/task_manager_mac.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 NSMutableIndexSet* indexSet = [NSMutableIndexSet indexSet]; | 166 NSMutableIndexSet* indexSet = [NSMutableIndexSet indexSet]; |
| 167 for (size_t i = 0; i < modelSelection.size(); ++i) | 167 for (size_t i = 0; i < modelSelection.size(); ++i) |
| 168 [indexSet addIndex:modelToViewMap_[modelSelection[i]]]; | 168 [indexSet addIndex:modelToViewMap_[modelSelection[i]]]; |
| 169 [tableView_ selectRowIndexes:indexSet byExtendingSelection:NO]; | 169 [tableView_ selectRowIndexes:indexSet byExtendingSelection:NO]; |
| 170 | 170 |
| 171 [tableView_ reloadData]; | 171 [tableView_ reloadData]; |
| 172 [self adjustSelectionAndEndProcessButton]; | 172 [self adjustSelectionAndEndProcessButton]; |
| 173 } | 173 } |
| 174 | 174 |
| 175 - (IBAction)statsLinkClicked:(id)sender { | 175 - (IBAction)statsLinkClicked:(id)sender { |
| 176 TaskManager::GetInstance()->OpenAboutMemory(chrome::HOST_DESKTOP_TYPE_NATIVE); | 176 TaskManager::GetInstance()->OpenAboutMemory(ui::HOST_DESKTOP_TYPE_NATIVE); |
| 177 } | 177 } |
| 178 | 178 |
| 179 - (IBAction)killSelectedProcesses:(id)sender { | 179 - (IBAction)killSelectedProcesses:(id)sender { |
| 180 NSIndexSet* selection = [tableView_ selectedRowIndexes]; | 180 NSIndexSet* selection = [tableView_ selectedRowIndexes]; |
| 181 for (NSUInteger i = [selection lastIndex]; | 181 for (NSUInteger i = [selection lastIndex]; |
| 182 i != NSNotFound; | 182 i != NSNotFound; |
| 183 i = [selection indexLessThanIndex:i]) { | 183 i = [selection indexLessThanIndex:i]) { |
| 184 taskManager_->KillProcess(viewToModelMap_[i]); | 184 taskManager_->KillProcess(viewToModelMap_[i]); |
| 185 } | 185 } |
| 186 } | 186 } |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 void ShowTaskManager(Browser* browser) { | 596 void ShowTaskManager(Browser* browser) { |
| 597 TaskManagerMac::Show(); | 597 TaskManagerMac::Show(); |
| 598 } | 598 } |
| 599 | 599 |
| 600 void HideTaskManager() { | 600 void HideTaskManager() { |
| 601 TaskManagerMac::Hide(); | 601 TaskManagerMac::Hide(); |
| 602 } | 602 } |
| 603 | 603 |
| 604 } // namespace chrome | 604 } // namespace chrome |
| 605 | 605 |
| OLD | NEW |