| 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 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 void TaskManager::OnWindowClosed() { | 1540 void TaskManager::OnWindowClosed() { |
| 1541 model_->StopUpdating(); | 1541 model_->StopUpdating(); |
| 1542 } | 1542 } |
| 1543 | 1543 |
| 1544 void TaskManager::ModelChanged() { | 1544 void TaskManager::ModelChanged() { |
| 1545 model_->ModelChanged(); | 1545 model_->ModelChanged(); |
| 1546 } | 1546 } |
| 1547 | 1547 |
| 1548 // static | 1548 // static |
| 1549 TaskManager* TaskManager::GetInstance() { | 1549 TaskManager* TaskManager::GetInstance() { |
| 1550 return Singleton<TaskManager>::get(); | 1550 return base::Singleton<TaskManager>::get(); |
| 1551 } | 1551 } |
| 1552 | 1552 |
| 1553 void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) { | 1553 void TaskManager::OpenAboutMemory(chrome::HostDesktopType desktop_type) { |
| 1554 Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); | 1554 Profile* profile = ProfileManager::GetLastUsedProfileAllowedByPolicy(); |
| 1555 if (profile->IsGuestSession() && !g_browser_process->local_state()-> | 1555 if (profile->IsGuestSession() && !g_browser_process->local_state()-> |
| 1556 GetBoolean(prefs::kBrowserGuestModeEnabled)) { | 1556 GetBoolean(prefs::kBrowserGuestModeEnabled)) { |
| 1557 UserManager::Show(base::FilePath(), | 1557 UserManager::Show(base::FilePath(), |
| 1558 profiles::USER_MANAGER_NO_TUTORIAL, | 1558 profiles::USER_MANAGER_NO_TUTORIAL, |
| 1559 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY); | 1559 profiles::USER_MANAGER_SELECT_PROFILE_CHROME_MEMORY); |
| 1560 return; | 1560 return; |
| 1561 } | 1561 } |
| 1562 | 1562 |
| 1563 chrome::NavigateParams params( | 1563 chrome::NavigateParams params( |
| 1564 profile, GURL(chrome::kChromeUIMemoryURL), ui::PAGE_TRANSITION_LINK); | 1564 profile, GURL(chrome::kChromeUIMemoryURL), ui::PAGE_TRANSITION_LINK); |
| 1565 params.disposition = NEW_FOREGROUND_TAB; | 1565 params.disposition = NEW_FOREGROUND_TAB; |
| 1566 params.host_desktop_type = desktop_type; | 1566 params.host_desktop_type = desktop_type; |
| 1567 chrome::Navigate(¶ms); | 1567 chrome::Navigate(¶ms); |
| 1568 } | 1568 } |
| 1569 | 1569 |
| 1570 TaskManager::TaskManager() | 1570 TaskManager::TaskManager() |
| 1571 : model_(new TaskManagerModel(this)) { | 1571 : model_(new TaskManagerModel(this)) { |
| 1572 } | 1572 } |
| 1573 | 1573 |
| 1574 TaskManager::~TaskManager() { | 1574 TaskManager::~TaskManager() { |
| 1575 } | 1575 } |
| OLD | NEW |