| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 FRIEND_TEST_ALL_PREFIXES(TaskManagerWindowControllerTest, | 321 FRIEND_TEST_ALL_PREFIXES(TaskManagerWindowControllerTest, |
| 322 SelectionAdaptsToSorting); | 322 SelectionAdaptsToSorting); |
| 323 | 323 |
| 324 enum UpdateState { | 324 enum UpdateState { |
| 325 IDLE = 0, // Currently not updating. | 325 IDLE = 0, // Currently not updating. |
| 326 TASK_PENDING, // An update task is pending. | 326 TASK_PENDING, // An update task is pending. |
| 327 STOPPING // A update task is pending and it should stop the update. | 327 STOPPING // A update task is pending and it should stop the update. |
| 328 }; | 328 }; |
| 329 | 329 |
| 330 // The delay between updates of the information (in ms). | 330 // The delay between updates of the information (in ms). |
| 331 #if defined(OS_MACOSX) | |
| 332 // Match Activity Monitor's default refresh rate. | 331 // Match Activity Monitor's default refresh rate. |
| 333 static const int kUpdateTimeMs = 2000; | 332 static const int kUpdateTimeMs = 2000; |
| 334 #else | |
| 335 static const int kUpdateTimeMs = 1000; | |
| 336 #endif | |
| 337 | 333 |
| 338 // Values cached per resource. Values are validated on demand. The is_XXX | 334 // Values cached per resource. Values are validated on demand. The is_XXX |
| 339 // members indicate if a value is valid. | 335 // members indicate if a value is valid. |
| 340 struct PerResourceValues { | 336 struct PerResourceValues { |
| 341 PerResourceValues(); | 337 PerResourceValues(); |
| 342 PerResourceValues(const PerResourceValues& other); | 338 PerResourceValues(const PerResourceValues& other); |
| 343 ~PerResourceValues(); | 339 ~PerResourceValues(); |
| 344 | 340 |
| 345 bool is_title_valid; | 341 bool is_title_valid; |
| 346 base::string16 title; | 342 base::string16 title; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 // Whether the IO thread is currently in the process of updating; accessed | 540 // Whether the IO thread is currently in the process of updating; accessed |
| 545 // only on the IO thread. | 541 // only on the IO thread. |
| 546 bool is_updating_byte_count_; | 542 bool is_updating_byte_count_; |
| 547 | 543 |
| 548 // Buffer for coalescing BytesReadParam so we don't have to post a task on | 544 // Buffer for coalescing BytesReadParam so we don't have to post a task on |
| 549 // each NotifyBytesRead() call. | 545 // each NotifyBytesRead() call. |
| 550 std::vector<BytesReadParam> bytes_read_buffer_; | 546 std::vector<BytesReadParam> bytes_read_buffer_; |
| 551 | 547 |
| 552 std::vector<base::Closure> on_data_ready_callbacks_; | 548 std::vector<base::Closure> on_data_ready_callbacks_; |
| 553 | 549 |
| 554 #if defined(OS_WIN) | |
| 555 std::unique_ptr<PrivateWorkingSetSnapshot> working_set_snapshot_; | |
| 556 #endif | |
| 557 | |
| 558 // All per-Resource values are stored here. | 550 // All per-Resource values are stored here. |
| 559 mutable PerResourceCache per_resource_cache_; | 551 mutable PerResourceCache per_resource_cache_; |
| 560 | 552 |
| 561 // All per-Process values are stored here. | 553 // All per-Process values are stored here. |
| 562 mutable PerProcessCache per_process_cache_; | 554 mutable PerProcessCache per_process_cache_; |
| 563 | 555 |
| 564 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 556 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
| 565 }; | 557 }; |
| 566 | 558 |
| 567 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 559 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
| OLD | NEW |