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 TaskManagerModel; | 26 class TaskManagerModel; |
26 class TaskManagerModelGpuDataManagerObserver; | 27 class TaskManagerModelGpuDataManagerObserver; |
27 | 28 |
28 namespace base { | 29 namespace base { |
29 class ProcessMetrics; | 30 class ProcessMetrics; |
30 } | 31 } |
31 | 32 |
32 namespace content { | 33 namespace content { |
33 class WebContents; | 34 class WebContents; |
34 } | 35 } |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 int routing_id) = 0; | 179 int routing_id) = 0; |
179 virtual void StartUpdating() = 0; | 180 virtual void StartUpdating() = 0; |
180 virtual void StopUpdating() = 0; | 181 virtual void StopUpdating() = 0; |
181 | 182 |
182 protected: | 183 protected: |
183 friend class base::RefCountedThreadSafe<ResourceProvider>; | 184 friend class base::RefCountedThreadSafe<ResourceProvider>; |
184 | 185 |
185 virtual ~ResourceProvider() {} | 186 virtual ~ResourceProvider() {} |
186 }; | 187 }; |
187 | 188 |
188 static void RegisterPrefs(PrefService* prefs); | 189 static void RegisterPrefs(PrefServiceSimple* prefs); |
189 | 190 |
190 // 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. |
191 bool IsBrowserProcess(int index) const; | 192 bool IsBrowserProcess(int index) const; |
192 | 193 |
193 // Terminates the process at the specified index. | 194 // Terminates the process at the specified index. |
194 void KillProcess(int index); | 195 void KillProcess(int index); |
195 | 196 |
196 // Activates the browser tab associated with the process in the specified | 197 // Activates the browser tab associated with the process in the specified |
197 // index. | 198 // index. |
198 void ActivateProcess(int index); | 199 void ActivateProcess(int index); |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 int last_unique_id_; | 615 int last_unique_id_; |
615 | 616 |
616 // 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 |
617 // each NotifyBytesRead() call. | 618 // each NotifyBytesRead() call. |
618 std::vector<BytesReadParam> bytes_read_buffer_; | 619 std::vector<BytesReadParam> bytes_read_buffer_; |
619 | 620 |
620 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 621 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
621 }; | 622 }; |
622 | 623 |
623 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 624 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
OLD | NEW |