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 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 base::string16 GetResourcePhysicalMemory(int index) const; | 175 base::string16 GetResourcePhysicalMemory(int index) const; |
176 base::string16 GetResourceProcessId(int index) const; | 176 base::string16 GetResourceProcessId(int index) const; |
177 base::string16 GetResourceGDIHandles(int index) const; | 177 base::string16 GetResourceGDIHandles(int index) const; |
178 base::string16 GetResourceUSERHandles(int index) const; | 178 base::string16 GetResourceUSERHandles(int index) const; |
179 base::string16 GetResourceWebCoreImageCacheSize(int index) const; | 179 base::string16 GetResourceWebCoreImageCacheSize(int index) const; |
180 base::string16 GetResourceWebCoreScriptsCacheSize(int index) const; | 180 base::string16 GetResourceWebCoreScriptsCacheSize(int index) const; |
181 base::string16 GetResourceWebCoreCSSCacheSize(int index) const; | 181 base::string16 GetResourceWebCoreCSSCacheSize(int index) const; |
182 base::string16 GetResourceVideoMemory(int index) const; | 182 base::string16 GetResourceVideoMemory(int index) const; |
183 base::string16 GetResourceSqliteMemoryUsed(int index) const; | 183 base::string16 GetResourceSqliteMemoryUsed(int index) const; |
184 base::string16 GetResourceIdleWakeupsPerSecond(int index) const; | 184 base::string16 GetResourceIdleWakeupsPerSecond(int index) const; |
185 base::string16 GetResourceGoatsTeleported(int index) const; | |
186 base::string16 GetResourceV8MemoryAllocatedSize(int index) const; | 185 base::string16 GetResourceV8MemoryAllocatedSize(int index) const; |
187 | 186 |
188 // Gets the private memory (in bytes) that should be displayed for the passed | 187 // Gets the private memory (in bytes) that should be displayed for the passed |
189 // resource index. Caches the result since this calculation can take time on | 188 // resource index. Caches the result since this calculation can take time on |
190 // some platforms. | 189 // some platforms. |
191 bool GetPrivateMemory(int index, size_t* result) const; | 190 bool GetPrivateMemory(int index, size_t* result) const; |
192 | 191 |
193 // Gets the shared memory (in bytes) that should be displayed for the passed | 192 // Gets the shared memory (in bytes) that should be displayed for the passed |
194 // resource index. Caches the result since this calculation can take time on | 193 // resource index. Caches the result since this calculation can take time on |
195 // some platforms. | 194 // some platforms. |
(...skipping 27 matching lines...) Expand all Loading... |
223 // resource for the given row isn't a renderer. | 222 // resource for the given row isn't a renderer. |
224 bool GetV8Memory(int index, size_t* result) const; | 223 bool GetV8Memory(int index, size_t* result) const; |
225 | 224 |
226 // Gets the amount of memory used for javascript. Returns false if the | 225 // Gets the amount of memory used for javascript. Returns false if the |
227 // resource for the given row isn't a renderer. | 226 // resource for the given row isn't a renderer. |
228 bool GetV8MemoryUsed(int index, size_t* result) const; | 227 bool GetV8MemoryUsed(int index, size_t* result) const; |
229 | 228 |
230 // Returns true if resource for the given row can be activated. | 229 // Returns true if resource for the given row can be activated. |
231 bool CanActivate(int index) const; | 230 bool CanActivate(int index) const; |
232 | 231 |
233 // See design doc at http://go/at-teleporter for more information. | |
234 int GetGoatsTeleported(int index) const; | |
235 | |
236 // Returns true if the resource is first/last in its group (resources | 232 // Returns true if the resource is first/last in its group (resources |
237 // rendered by the same process are groupped together). | 233 // rendered by the same process are groupped together). |
238 bool IsResourceFirstInGroup(int index) const; | 234 bool IsResourceFirstInGroup(int index) const; |
239 bool IsResourceLastInGroup(int index) const; | 235 bool IsResourceLastInGroup(int index) const; |
240 | 236 |
241 // Returns icon to be used for resource (for example a favicon). | 237 // Returns icon to be used for resource (for example a favicon). |
242 gfx::ImageSkia GetResourceIcon(int index) const; | 238 gfx::ImageSkia GetResourceIcon(int index) const; |
243 | 239 |
244 // Returns the group range of resource. | 240 // Returns the group range of resource. |
245 GroupRange GetGroupRangeForResource(int index) const; | 241 GroupRange GetGroupRangeForResource(int index) const; |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 336 |
341 bool is_profile_name_valid; | 337 bool is_profile_name_valid; |
342 base::string16 profile_name; | 338 base::string16 profile_name; |
343 | 339 |
344 // No is_network_usage since default (0) is fine. | 340 // No is_network_usage since default (0) is fine. |
345 int64 network_usage; | 341 int64 network_usage; |
346 | 342 |
347 bool is_process_id_valid; | 343 bool is_process_id_valid; |
348 base::ProcessId process_id; | 344 base::ProcessId process_id; |
349 | 345 |
350 bool is_goats_teleported_valid; | |
351 int goats_teleported; | |
352 | |
353 bool is_webcore_stats_valid; | 346 bool is_webcore_stats_valid; |
354 blink::WebCache::ResourceTypeStats webcore_stats; | 347 blink::WebCache::ResourceTypeStats webcore_stats; |
355 | 348 |
356 bool is_sqlite_memory_bytes_valid; | 349 bool is_sqlite_memory_bytes_valid; |
357 size_t sqlite_memory_bytes; | 350 size_t sqlite_memory_bytes; |
358 | 351 |
359 bool is_v8_memory_valid; | 352 bool is_v8_memory_valid; |
360 size_t v8_memory_allocated; | 353 size_t v8_memory_allocated; |
361 size_t v8_memory_used; | 354 size_t v8_memory_used; |
362 }; | 355 }; |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 // StopListening. | 526 // StopListening. |
534 int listen_requests_; | 527 int listen_requests_; |
535 | 528 |
536 // Whether we are currently in the process of updating. | 529 // Whether we are currently in the process of updating. |
537 UpdateState update_state_; | 530 UpdateState update_state_; |
538 | 531 |
539 // Whether the IO thread is currently in the process of updating; accessed | 532 // Whether the IO thread is currently in the process of updating; accessed |
540 // only on the IO thread. | 533 // only on the IO thread. |
541 bool is_updating_byte_count_; | 534 bool is_updating_byte_count_; |
542 | 535 |
543 // A salt lick for the goats. | |
544 uint64 goat_salt_; | |
545 | |
546 // Buffer for coalescing BytesReadParam so we don't have to post a task on | 536 // Buffer for coalescing BytesReadParam so we don't have to post a task on |
547 // each NotifyBytesRead() call. | 537 // each NotifyBytesRead() call. |
548 std::vector<BytesReadParam> bytes_read_buffer_; | 538 std::vector<BytesReadParam> bytes_read_buffer_; |
549 | 539 |
550 std::vector<base::Closure> on_data_ready_callbacks_; | 540 std::vector<base::Closure> on_data_ready_callbacks_; |
551 | 541 |
552 // All per-Resource values are stored here. | 542 // All per-Resource values are stored here. |
553 mutable PerResourceCache per_resource_cache_; | 543 mutable PerResourceCache per_resource_cache_; |
554 | 544 |
555 // All per-Process values are stored here. | 545 // All per-Process values are stored here. |
556 mutable PerProcessCache per_process_cache_; | 546 mutable PerProcessCache per_process_cache_; |
557 | 547 |
558 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 548 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
559 }; | 549 }; |
560 | 550 |
561 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 551 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
OLD | NEW |