| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_MANAGEMENT_PROVIDERS_TASK_H_ | 5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_ |
| 6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_ | 6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 virtual void Activate(); | 48 virtual void Activate(); |
| 49 | 49 |
| 50 // Will be called to let the task refresh itself between refresh cycles. | 50 // Will be called to let the task refresh itself between refresh cycles. |
| 51 // |update_interval| is the time since the last task manager refresh. | 51 // |update_interval| is the time since the last task manager refresh. |
| 52 // the |refresh_flags| indicate which resources should be calculated on each | 52 // the |refresh_flags| indicate which resources should be calculated on each |
| 53 // refresh. | 53 // refresh. |
| 54 virtual void Refresh(const base::TimeDelta& update_interval, | 54 virtual void Refresh(const base::TimeDelta& update_interval, |
| 55 int64 refresh_flags); | 55 int64 refresh_flags); |
| 56 | 56 |
| 57 // Will receive this notification through the task manager from | 57 // Will receive this notification through the task manager from |
| 58 // |ChromeNetworkDelegate::OnRawBytesRead()|. The task will add to the | 58 // |ChromeNetworkDelegate::OnNetworkBytesReceived()|. The task will add to the |
| 59 // |current_byte_count_| in this refresh cycle. | 59 // |current_byte_count_| in this refresh cycle. |
| 60 void OnNetworkBytesRead(int64 bytes_read); | 60 void OnNetworkBytesRead(int64 bytes_read); |
| 61 | 61 |
| 62 // Returns the task type. | 62 // Returns the task type. |
| 63 virtual Type GetType() const = 0; | 63 virtual Type GetType() const = 0; |
| 64 | 64 |
| 65 // This is the unique ID of the BrowserChildProcessHost/RenderProcessHost. It | 65 // This is the unique ID of the BrowserChildProcessHost/RenderProcessHost. It |
| 66 // is not the PID nor the handle of the process. | 66 // is not the PID nor the handle of the process. |
| 67 // For a task that represents the browser process, the return value is 0. For | 67 // For a task that represents the browser process, the return value is 0. For |
| 68 // other tasks that represent renderers and other child processes, the return | 68 // other tasks that represent renderers and other child processes, the return |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 // The PID of the process on which this task is running. | 130 // The PID of the process on which this task is running. |
| 131 const base::ProcessId process_id_; | 131 const base::ProcessId process_id_; |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(Task); | 133 DISALLOW_COPY_AND_ASSIGN(Task); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace task_management | 136 } // namespace task_management |
| 137 | 137 |
| 138 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_ | 138 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_TASK_H_ |
| OLD | NEW |