| 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 <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "base/memory/singleton.h" | 15 #include "base/memory/singleton.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "base/process_util.h" | 17 #include "base/process_util.h" |
| 18 #include "base/string16.h" | 18 #include "base/string16.h" |
| 19 #include "base/timer.h" | 19 #include "base/timer.h" |
| 20 #include "chrome/browser/renderer_host/web_cache_manager.h" | 20 #include "chrome/browser/renderer_host/web_cache_manager.h" |
| 21 #include "chrome/browser/ui/host_desktop.h" | 21 #include "chrome/browser/ui/host_desktop.h" |
| 22 #include "content/public/common/gpu_memory_stats.h" | 22 #include "content/public/common/gpu_memory_stats.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" |
| 24 | 24 |
| 25 class PrefServiceSimple; | 25 class PrefRegistrarSimple; |
| 26 class TaskManagerModel; | 26 class TaskManagerModel; |
| 27 class TaskManagerModelGpuDataManagerObserver; | 27 class TaskManagerModelGpuDataManagerObserver; |
| 28 | 28 |
| 29 namespace base { | 29 namespace base { |
| 30 class ProcessMetrics; | 30 class ProcessMetrics; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace content { | 33 namespace content { |
| 34 class WebContents; | 34 class WebContents; |
| 35 } | 35 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 int routing_id) = 0; | 179 int routing_id) = 0; |
| 180 virtual void StartUpdating() = 0; | 180 virtual void StartUpdating() = 0; |
| 181 virtual void StopUpdating() = 0; | 181 virtual void StopUpdating() = 0; |
| 182 | 182 |
| 183 protected: | 183 protected: |
| 184 friend class base::RefCountedThreadSafe<ResourceProvider>; | 184 friend class base::RefCountedThreadSafe<ResourceProvider>; |
| 185 | 185 |
| 186 virtual ~ResourceProvider() {} | 186 virtual ~ResourceProvider() {} |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 static void RegisterPrefs(PrefServiceSimple* prefs); | 189 static void RegisterPrefs(PrefRegistrarSimple* prefs); |
| 190 | 190 |
| 191 // Returns true if the process at the specified index is the browser process. | 191 // Returns true if the process at the specified index is the browser process. |
| 192 bool IsBrowserProcess(int index) const; | 192 bool IsBrowserProcess(int index) const; |
| 193 | 193 |
| 194 // Terminates the process at the specified index. | 194 // Terminates the process at the specified index. |
| 195 void KillProcess(int index); | 195 void KillProcess(int index); |
| 196 | 196 |
| 197 // Activates the browser tab associated with the process in the specified | 197 // Activates the browser tab associated with the process in the specified |
| 198 // index. | 198 // index. |
| 199 void ActivateProcess(int index); | 199 void ActivateProcess(int index); |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 int last_unique_id_; | 615 int last_unique_id_; |
| 616 | 616 |
| 617 // Buffer for coalescing BytesReadParam so we don't have to post a task on | 617 // Buffer for coalescing BytesReadParam so we don't have to post a task on |
| 618 // each NotifyBytesRead() call. | 618 // each NotifyBytesRead() call. |
| 619 std::vector<BytesReadParam> bytes_read_buffer_; | 619 std::vector<BytesReadParam> bytes_read_buffer_; |
| 620 | 620 |
| 621 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 621 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
| 622 }; | 622 }; |
| 623 | 623 |
| 624 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 624 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
| OLD | NEW |