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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 // Match Activity Monitor's default refresh rate. | 325 // Match Activity Monitor's default refresh rate. |
326 static const int kUpdateTimeMs = 2000; | 326 static const int kUpdateTimeMs = 2000; |
327 #else | 327 #else |
328 static const int kUpdateTimeMs = 1000; | 328 static const int kUpdateTimeMs = 1000; |
329 #endif | 329 #endif |
330 | 330 |
331 // Values cached per resource. Values are validated on demand. The is_XXX | 331 // Values cached per resource. Values are validated on demand. The is_XXX |
332 // members indicate if a value is valid. | 332 // members indicate if a value is valid. |
333 struct PerResourceValues { | 333 struct PerResourceValues { |
334 PerResourceValues(); | 334 PerResourceValues(); |
| 335 PerResourceValues(const PerResourceValues& other); |
335 ~PerResourceValues(); | 336 ~PerResourceValues(); |
336 | 337 |
337 bool is_title_valid; | 338 bool is_title_valid; |
338 base::string16 title; | 339 base::string16 title; |
339 | 340 |
340 bool is_profile_name_valid; | 341 bool is_profile_name_valid; |
341 base::string16 profile_name; | 342 base::string16 profile_name; |
342 | 343 |
343 // No is_network_usage since default (0) is fine. | 344 // No is_network_usage since default (0) is fine. |
344 int64_t network_usage; | 345 int64_t network_usage; |
345 | 346 |
346 bool is_process_id_valid; | 347 bool is_process_id_valid; |
347 base::ProcessId process_id; | 348 base::ProcessId process_id; |
348 | 349 |
349 bool is_webcore_stats_valid; | 350 bool is_webcore_stats_valid; |
350 blink::WebCache::ResourceTypeStats webcore_stats; | 351 blink::WebCache::ResourceTypeStats webcore_stats; |
351 | 352 |
352 bool is_sqlite_memory_bytes_valid; | 353 bool is_sqlite_memory_bytes_valid; |
353 size_t sqlite_memory_bytes; | 354 size_t sqlite_memory_bytes; |
354 | 355 |
355 bool is_v8_memory_valid; | 356 bool is_v8_memory_valid; |
356 size_t v8_memory_allocated; | 357 size_t v8_memory_allocated; |
357 size_t v8_memory_used; | 358 size_t v8_memory_used; |
358 }; | 359 }; |
359 | 360 |
360 // Values cached per process. Values are validated on demand. The is_XXX | 361 // Values cached per process. Values are validated on demand. The is_XXX |
361 // members indicate if a value is valid. | 362 // members indicate if a value is valid. |
362 struct PerProcessValues { | 363 struct PerProcessValues { |
363 PerProcessValues(); | 364 PerProcessValues(); |
| 365 PerProcessValues(const PerProcessValues& other); |
364 ~PerProcessValues(); | 366 ~PerProcessValues(); |
365 | 367 |
366 bool is_cpu_usage_valid; | 368 bool is_cpu_usage_valid; |
367 double cpu_usage; | 369 double cpu_usage; |
368 | 370 |
369 bool is_idle_wakeups_valid; | 371 bool is_idle_wakeups_valid; |
370 int idle_wakeups; | 372 int idle_wakeups; |
371 | 373 |
372 bool is_private_and_shared_valid; | 374 bool is_private_and_shared_valid; |
373 size_t private_bytes; | 375 size_t private_bytes; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 // All per-Resource values are stored here. | 551 // All per-Resource values are stored here. |
550 mutable PerResourceCache per_resource_cache_; | 552 mutable PerResourceCache per_resource_cache_; |
551 | 553 |
552 // All per-Process values are stored here. | 554 // All per-Process values are stored here. |
553 mutable PerProcessCache per_process_cache_; | 555 mutable PerProcessCache per_process_cache_; |
554 | 556 |
555 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 557 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
556 }; | 558 }; |
557 | 559 |
558 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 560 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
OLD | NEW |