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

Side by Side Diff: chrome/browser/ui/cocoa/task_manager_mac.mm

Issue 1912773002: Remove the old task manager view (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig's comments Created 4 years, 7 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) 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/mac/bundle_locations.h" 12 #include "base/mac/bundle_locations.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/strings/sys_string_conversions.h" 14 #include "base/strings/sys_string_conversions.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/task_management/task_manager_interface.h"
16 #include "chrome/browser/ui/browser.h" 17 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/browser_dialogs.h" 18 #include "chrome/browser/ui/browser_dialogs.h"
18 #import "chrome/browser/ui/cocoa/window_size_autosaver.h" 19 #import "chrome/browser/ui/cocoa/window_size_autosaver.h"
19 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
20 #include "chrome/grit/generated_resources.h" 21 #include "chrome/grit/generated_resources.h"
21 #include "components/prefs/pref_service.h" 22 #include "components/prefs/pref_service.h"
22 #include "third_party/skia/include/core/SkBitmap.h" 23 #include "third_party/skia/include/core/SkBitmap.h"
23 #include "ui/base/l10n/l10n_util_mac.h" 24 #include "ui/base/l10n/l10n_util_mac.h"
24 #include "ui/gfx/image/image_skia.h" 25 #include "ui/gfx/image/image_skia.h"
25 26
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 407
407 TaskManagerModel::GroupRange rangePair = 408 TaskManagerModel::GroupRange rangePair =
408 model_->GetGroupRangeForResource(modelIndex); 409 model_->GetGroupRangeForResource(modelIndex);
409 NSMutableIndexSet* indexSet = [NSMutableIndexSet indexSet]; 410 NSMutableIndexSet* indexSet = [NSMutableIndexSet indexSet];
410 for (int j = 0; j < rangePair.second; ++j) 411 for (int j = 0; j < rangePair.second; ++j)
411 [indexSet addIndex:modelToViewMap_[rangePair.first + j]]; 412 [indexSet addIndex:modelToViewMap_[rangePair.first + j]];
412 [tableView_ selectRowIndexes:indexSet byExtendingSelection:YES]; 413 [tableView_ selectRowIndexes:indexSet byExtendingSelection:YES];
413 } 414 }
414 415
415 bool enabled = [selection count] > 0 && !selectionContainsBrowserProcess && 416 bool enabled = [selection count] > 0 && !selectionContainsBrowserProcess &&
416 TaskManager::IsEndProcessEnabled(); 417 task_management::TaskManagerInterface::IsEndProcessEnabled();
417 [endProcessButton_ setEnabled:enabled]; 418 [endProcessButton_ setEnabled:enabled];
418 } 419 }
419 420
420 - (void)deselectRows { 421 - (void)deselectRows {
421 [tableView_ deselectAll:self]; 422 [tableView_ deselectAll:self];
422 } 423 }
423 424
424 // Table view delegate methods. 425 // Table view delegate methods.
425 426
426 // The selection is being changed by mouse (drag/click). 427 // The selection is being changed by mouse (drag/click).
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 if (chrome::ToolkitViewsDialogsEnabled()) { 609 if (chrome::ToolkitViewsDialogsEnabled()) {
609 chrome::HideTaskManagerViews(); 610 chrome::HideTaskManagerViews();
610 return; 611 return;
611 } 612 }
612 613
613 TaskManagerMac::Hide(); 614 TaskManagerMac::Hide();
614 } 615 }
615 616
616 } // namespace chrome 617 } // namespace chrome
617 618
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698