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

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

Issue 1320563002: Task Manager Should remember the most recently enabled columns. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig's comments 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
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);
1503 } 1504 }
1504 1505
1505 bool TaskManager::IsBrowserProcess(int index) const { 1506 bool TaskManager::IsBrowserProcess(int index) const {
1506 // If some of the selection is out of bounds, ignore. This may happen when 1507 // If some of the selection is out of bounds, ignore. This may happen when
1507 // killing a process that manages several pages. 1508 // killing a process that manages several pages.
1508 return index < model_->ResourceCount() && 1509 return index < model_->ResourceCount() &&
1509 model_->GetProcess(index) == base::GetCurrentProcessHandle(); 1510 model_->GetProcess(index) == base::GetCurrentProcessHandle();
1510 } 1511 }
1511 1512
1512 void TaskManager::KillProcess(int index) { 1513 void TaskManager::KillProcess(int index) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 params.host_desktop_type = desktop_type; 1567 params.host_desktop_type = desktop_type;
1567 chrome::Navigate(&params); 1568 chrome::Navigate(&params);
1568 } 1569 }
1569 1570
1570 TaskManager::TaskManager() 1571 TaskManager::TaskManager()
1571 : model_(new TaskManagerModel(this)) { 1572 : model_(new TaskManagerModel(this)) {
1572 } 1573 }
1573 1574
1574 TaskManager::~TaskManager() { 1575 TaskManager::~TaskManager() {
1575 } 1576 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/new_task_manager_view.h » ('j') | chrome/browser/ui/views/new_task_manager_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698