OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 ~TaskManagerModel(); | 338 ~TaskManagerModel(); |
339 | 339 |
340 enum UpdateState { | 340 enum UpdateState { |
341 IDLE = 0, // Currently not updating. | 341 IDLE = 0, // Currently not updating. |
342 TASK_PENDING, // An update task is pending. | 342 TASK_PENDING, // An update task is pending. |
343 STOPPING // A update task is pending and it should stop the update. | 343 STOPPING // A update task is pending and it should stop the update. |
344 }; | 344 }; |
345 | 345 |
346 // This struct is used to exchange information between the io and ui threads. | 346 // This struct is used to exchange information between the io and ui threads. |
347 struct BytesReadParam { | 347 struct BytesReadParam { |
348 BytesReadParam(int origin_child_id, | 348 BytesReadParam(int origin_pid, |
349 int render_process_host_child_id, | 349 int render_process_host_child_id, |
350 int routing_id, | 350 int routing_id, |
351 int byte_count) | 351 int byte_count) |
352 : origin_child_id(origin_child_id), | 352 : origin_pid(origin_pid), |
353 render_process_host_child_id(render_process_host_child_id), | 353 render_process_host_child_id(render_process_host_child_id), |
354 routing_id(routing_id), | 354 routing_id(routing_id), |
355 byte_count(byte_count) {} | 355 byte_count(byte_count) {} |
356 | 356 |
357 // This is the child ID of the originator of the request. It will often be | 357 // The process ID that triggered the request. For plugin requests this |
358 // the same as the render_process_host_child_id, but will be different when | 358 // will differ from the renderer process ID. |
359 // another sub-process like a plugin is routing requests through a renderer. | 359 int origin_pid; |
360 int origin_child_id; | |
361 | 360 |
362 // The child ID of the RenderProcessHist this request was routed through. | 361 // The child ID of the RenderProcessHost this request was routed through. |
363 int render_process_host_child_id; | 362 int render_process_host_child_id; |
364 | 363 |
365 int routing_id; | 364 int routing_id; |
366 int byte_count; | 365 int byte_count; |
367 }; | 366 }; |
368 | 367 |
369 typedef std::vector<TaskManager::Resource*> ResourceList; | 368 typedef std::vector<TaskManager::Resource*> ResourceList; |
370 typedef std::vector<TaskManager::ResourceProvider*> ResourceProviderList; | 369 typedef std::vector<TaskManager::ResourceProvider*> ResourceProviderList; |
371 typedef std::map<base::ProcessHandle, ResourceList*> GroupMap; | 370 typedef std::map<base::ProcessHandle, ResourceList*> GroupMap; |
372 typedef std::map<base::ProcessHandle, base::ProcessMetrics*> MetricsMap; | 371 typedef std::map<base::ProcessHandle, base::ProcessMetrics*> MetricsMap; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 // Whether we are currently in the process of updating. | 457 // Whether we are currently in the process of updating. |
459 UpdateState update_state_; | 458 UpdateState update_state_; |
460 | 459 |
461 // A salt lick for the goats. | 460 // A salt lick for the goats. |
462 int goat_salt_; | 461 int goat_salt_; |
463 | 462 |
464 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); | 463 DISALLOW_COPY_AND_ASSIGN(TaskManagerModel); |
465 }; | 464 }; |
466 | 465 |
467 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ | 466 #endif // CHROME_BROWSER_TASK_MANAGER_TASK_MANAGER_H_ |
OLD | NEW |