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/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 Loading... |
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 Loading... |
1566 params.host_desktop_type = desktop_type; | 1567 params.host_desktop_type = desktop_type; |
1567 chrome::Navigate(¶ms); | 1568 chrome::Navigate(¶ms); |
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 } |
OLD | NEW |