Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: chrome/browser/task_manager/task_manager.h

Issue 1219233002: Revert of Make task manager memory data more efficient and meaningful. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 PrivateWorkingSetSnapshot;
25 class TaskManagerModel; 24 class TaskManagerModel;
26 class TaskManagerModelGpuDataManagerObserver; 25 class TaskManagerModelGpuDataManagerObserver;
27 26
28 namespace base { 27 namespace base {
29 class ProcessMetrics; 28 class ProcessMetrics;
30 } 29 }
31 30
32 namespace content { 31 namespace content {
33 class WebContents; 32 class WebContents;
34 } 33 }
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 277
279 void Clear(); // Removes all items. 278 void Clear(); // Removes all items.
280 279
281 // Sends OnModelChanged() to all observers to inform them of significant 280 // Sends OnModelChanged() to all observers to inform them of significant
282 // changes to the model. 281 // changes to the model.
283 void ModelChanged(); 282 void ModelChanged();
284 283
285 // Updates the values for all rows. 284 // Updates the values for all rows.
286 void Refresh(); 285 void Refresh();
287 286
288 // Do a bulk repopulation of the physical_memory data on platforms where that
289 // is faster.
290 void RefreshPhysicalMemoryFromWorkingSetSnapshot();
291
292 void NotifyVideoMemoryUsageStats( 287 void NotifyVideoMemoryUsageStats(
293 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats); 288 const content::GPUVideoMemoryUsageStats& video_memory_usage_stats);
294 289
295 void NotifyBytesRead(const net::URLRequest& request, int bytes_read); 290 void NotifyBytesRead(const net::URLRequest& request, int bytes_read);
296 291
297 void RegisterOnDataReadyCallback(const base::Closure& callback); 292 void RegisterOnDataReadyCallback(const base::Closure& callback);
298 293
299 void NotifyDataReady(); 294 void NotifyDataReady();
300 295
301 private: 296 private:
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 // Whether the IO thread is currently in the process of updating; accessed 522 // Whether the IO thread is currently in the process of updating; accessed
528 // only on the IO thread. 523 // only on the IO thread.
529 bool is_updating_byte_count_; 524 bool is_updating_byte_count_;
530 525
531 // Buffer for coalescing BytesReadParam so we don't have to post a task on 526 // Buffer for coalescing BytesReadParam so we don't have to post a task on
532 // each NotifyBytesRead() call. 527 // each NotifyBytesRead() call.
533 std::vector<BytesReadParam> bytes_read_buffer_; 528 std::vector<BytesReadParam> bytes_read_buffer_;
534 529
535 std::vector<base::Closure> on_data_ready_callbacks_; 530 std::vector<base::Closure> on_data_ready_callbacks_;
536 531
537 #if defined(OS_WIN)
538 scoped_ptr<PrivateWorkingSetSnapshot> working_set_snapshot_;
539 #endif
540
541 // All per-Resource values are stored here. 532 // All per-Resource values are stored here.
542 mutable PerResourceCache per_resource_cache_; 533 mutable PerResourceCache per_resource_cache_;
543 534
544 // All per-Process values are stored here. 535 // All per-Process values are stored here.
545 mutable PerProcessCache per_process_cache_; 536 mutable PerProcessCache per_process_cache_;
546 537
547 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); 538 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel);
548 }; 539 };
549 540
550 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ 541 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/private_working_set_snapshot_win_unittest.cc ('k') | chrome/browser/task_manager/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698