| 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 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 6 #define CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // OnModelChanged() events. | 76 // OnModelChanged() events. |
| 77 void ModelChanged(); | 77 void ModelChanged(); |
| 78 | 78 |
| 79 // Returns the singleton instance (and initializes it if necessary). | 79 // Returns the singleton instance (and initializes it if necessary). |
| 80 static TaskManager* GetInstance(); | 80 static TaskManager* GetInstance(); |
| 81 | 81 |
| 82 TaskManagerModel* model() const { return model_.get(); } | 82 TaskManagerModel* model() const { return model_.get(); } |
| 83 | 83 |
| 84 void OpenAboutMemory(chrome::HostDesktopType desktop_type); | 84 void OpenAboutMemory(chrome::HostDesktopType desktop_type); |
| 85 | 85 |
| 86 // Returns the number of background pages that will be displayed in the | |
| 87 // TaskManager. Used by the wrench menu code to display a count of background | |
| 88 // pages in the "View Background Pages" menu item. | |
| 89 static int GetBackgroundPageCount(); | |
| 90 | |
| 91 private: | 86 private: |
| 92 FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, Basic); | 87 FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, Basic); |
| 93 FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, Resources); | 88 FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, Resources); |
| 94 FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, RefreshCalled); | 89 FRIEND_TEST_ALL_PREFIXES(TaskManagerTest, RefreshCalled); |
| 95 FRIEND_TEST_ALL_PREFIXES(TaskManagerWindowControllerTest, Init); | 90 FRIEND_TEST_ALL_PREFIXES(TaskManagerWindowControllerTest, Init); |
| 96 FRIEND_TEST_ALL_PREFIXES(TaskManagerWindowControllerTest, Sort); | 91 FRIEND_TEST_ALL_PREFIXES(TaskManagerWindowControllerTest, Sort); |
| 97 FRIEND_TEST_ALL_PREFIXES(TaskManagerWindowControllerTest, | 92 FRIEND_TEST_ALL_PREFIXES(TaskManagerWindowControllerTest, |
| 98 SelectionAdaptsToSorting); | 93 SelectionAdaptsToSorting); |
| 99 | 94 |
| 100 // Obtain an instance via GetInstance(). | 95 // Obtain an instance via GetInstance(). |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 // All per-Resource values are stored here. | 558 // All per-Resource values are stored here. |
| 564 mutable PerResourceCache per_resource_cache_; | 559 mutable PerResourceCache per_resource_cache_; |
| 565 | 560 |
| 566 // All per-Process values are stored here. | 561 // All per-Process values are stored here. |
| 567 mutable PerProcessCache per_process_cache_; | 562 mutable PerProcessCache per_process_cache_; |
| 568 | 563 |
| 569 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 564 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
| 570 }; | 565 }; |
| 571 | 566 |
| 572 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 567 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
| OLD | NEW |