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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.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/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "chrome/browser/task_manager/resource_provider.h" | 18 #include "chrome/browser/task_manager/resource_provider.h" |
19 #include "chrome/browser/ui/host_desktop.h" | 19 #include "chrome/browser/ui/host_desktop.h" |
20 #include "content/public/common/gpu_memory_stats.h" | 20 #include "content/public/common/gpu_memory_stats.h" |
21 #include "third_party/WebKit/public/web/WebCache.h" | 21 #include "third_party/WebKit/public/web/WebCache.h" |
22 | 22 |
23 class PrefRegistrySimple; | 23 class PrefRegistrySimple; |
24 class TaskManagerModel; | 24 class TaskManagerModel; |
25 class TaskManagerModelGpuDataManagerObserver; | 25 class TaskManagerModelGpuDataManagerObserver; |
26 | 26 |
27 namespace base { | 27 namespace base { |
28 class ProcessMetrics; | 28 class ProcessMetrics; |
29 class PrivateWorkingSetSnapshot; | |
ncarter (slow)
2015/06/26 21:46:17
Nit: sort
brucedawson
2015/06/27 00:13:06
Done.
| |
29 } | 30 } |
30 | 31 |
31 namespace content { | 32 namespace content { |
32 class WebContents; | 33 class WebContents; |
33 } | 34 } |
34 | 35 |
35 namespace extensions { | 36 namespace extensions { |
36 class Extension; | 37 class Extension; |
37 } | 38 } |
38 | 39 |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
277 | 278 |
278 void Clear(); // Removes all items. | 279 void Clear(); // Removes all items. |
279 | 280 |
280 // Sends OnModelChanged() to all observers to inform them of significant | 281 // Sends OnModelChanged() to all observers to inform them of significant |
281 // changes to the model. | 282 // changes to the model. |
282 void ModelChanged(); | 283 void ModelChanged(); |
283 | 284 |
284 // Updates the values for all rows. | 285 // Updates the values for all rows. |
285 void Refresh(); | 286 void Refresh(); |
286 | 287 |
288 // Do a bulk repopulation of the cache on platforms where that is faster. | |
289 void PopulateCache(); | |
290 | |
287 void NotifyVideoMemoryUsageStats( | 291 void NotifyVideoMemoryUsageStats( |
288 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats); | 292 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats); |
289 | 293 |
290 void NotifyBytesRead(const net::URLRequest& request, int bytes_read); | 294 void NotifyBytesRead(const net::URLRequest& request, int bytes_read); |
291 | 295 |
292 void RegisterOnDataReadyCallback(const base::Closure& callback); | 296 void RegisterOnDataReadyCallback(const base::Closure& callback); |
293 | 297 |
294 void NotifyDataReady(); | 298 void NotifyDataReady(); |
295 | 299 |
296 private: | 300 private: |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
522 // Whether the IO thread is currently in the process of updating; accessed | 526 // Whether the IO thread is currently in the process of updating; accessed |
523 // only on the IO thread. | 527 // only on the IO thread. |
524 bool is_updating_byte_count_; | 528 bool is_updating_byte_count_; |
525 | 529 |
526 // Buffer for coalescing BytesReadParam so we don't have to post a task on | 530 // Buffer for coalescing BytesReadParam so we don't have to post a task on |
527 // each NotifyBytesRead() call. | 531 // each NotifyBytesRead() call. |
528 std::vector<BytesReadParam> bytes_read_buffer_; | 532 std::vector<BytesReadParam> bytes_read_buffer_; |
529 | 533 |
530 std::vector<base::Closure> on_data_ready_callbacks_; | 534 std::vector<base::Closure> on_data_ready_callbacks_; |
531 | 535 |
536 #if defined(OS_WIN) | |
537 scoped_ptr<base::PrivateWorkingSetSnapshot> working_set_snapshot_; | |
538 #endif | |
539 | |
532 // All per-Resource values are stored here. | 540 // All per-Resource values are stored here. |
533 mutable PerResourceCache per_resource_cache_; | 541 mutable PerResourceCache per_resource_cache_; |
534 | 542 |
535 // All per-Process values are stored here. | 543 // All per-Process values are stored here. |
536 mutable PerProcessCache per_process_cache_; | 544 mutable PerProcessCache per_process_cache_; |
537 | 545 |
538 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 546 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
539 }; | 547 }; |
540 | 548 |
541 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 549 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
OLD | NEW |