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

Side by Side Diff: chrome/browser/task_manager/task_manager.cc

Issue 1323853005: Revert of Task Manager Should remember the most recently enabled columns. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/new_task_manager_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/task_manager/task_manager.h" 5 #include "chrome/browser/task_manager/task_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/i18n/number_formatting.h" 8 #include "base/i18n/number_formatting.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 CHECK_LT(index, static_cast<int>(resources_.size())); 1493 CHECK_LT(index, static_cast<int>(resources_.size()));
1494 return resources_[index]; 1494 return resources_[index];
1495 } 1495 }
1496 1496
1497 //////////////////////////////////////////////////////////////////////////////// 1497 ////////////////////////////////////////////////////////////////////////////////
1498 // TaskManager class 1498 // TaskManager class
1499 //////////////////////////////////////////////////////////////////////////////// 1499 ////////////////////////////////////////////////////////////////////////////////
1500 // static 1500 // static
1501 void TaskManager::RegisterPrefs(PrefRegistrySimple* registry) { 1501 void TaskManager::RegisterPrefs(PrefRegistrySimple* registry) {
1502 registry->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement); 1502 registry->RegisterDictionaryPref(prefs::kTaskManagerWindowPlacement);
1503 registry->RegisterDictionaryPref(prefs::kTaskManagerColumnVisibility);
1504 } 1503 }
1505 1504
1506 bool TaskManager::IsBrowserProcess(int index) const { 1505 bool TaskManager::IsBrowserProcess(int index) const {
1507 // If some of the selection is out of bounds, ignore. This may happen when 1506 // If some of the selection is out of bounds, ignore. This may happen when
1508 // killing a process that manages several pages. 1507 // killing a process that manages several pages.
1509 return index < model_->ResourceCount() && 1508 return index < model_->ResourceCount() &&
1510 model_->GetProcess(index) == base::GetCurrentProcessHandle(); 1509 model_->GetProcess(index) == base::GetCurrentProcessHandle();
1511 } 1510 }
1512 1511
1513 void TaskManager::KillProcess(int index) { 1512 void TaskManager::KillProcess(int index) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 params.host_desktop_type = desktop_type; 1566 params.host_desktop_type = desktop_type;
1568 chrome::Navigate(&params); 1567 chrome::Navigate(&params);
1569 } 1568 }
1570 1569
1571 TaskManager::TaskManager() 1570 TaskManager::TaskManager()
1572 : model_(new TaskManagerModel(this)) { 1571 : model_(new TaskManagerModel(this)) {
1573 } 1572 }
1574 1573
1575 TaskManager::~TaskManager() { 1574 TaskManager::~TaskManager() {
1576 } 1575 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/new_task_manager_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698