Update broken references to image assets
[chromium-blink-merge.git] / chrome / browser / task_management / providers / child_process_task.h
blob9dc06e5c9d878817f75daeff1632f2bd1be29478
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_CHILD_PROCESS_TASK_H_
6 #define CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_CHILD_PROCESS_TASK_H_
8 #include "chrome/browser/task_management/providers/task.h"
10 class ProcessResourceUsage;
12 namespace content {
13 struct ChildProcessData;
14 } // namespace content
16 namespace task_management {
18 // Represents several types of the browser's child processes such as
19 // a plugin or a GPU process, ... etc.
20 class ChildProcessTask : public Task {
21 public:
22 // Creates a child process task given its |data| which is
23 // received from observing |content::BrowserChildProcessObserver|.
24 explicit ChildProcessTask(const content::ChildProcessData& data);
26 ~ChildProcessTask() override;
28 // task_management::Task:
29 void Refresh(const base::TimeDelta& update_interval,
30 int64 refresh_flags) override;
31 Type GetType() const override;
32 int GetChildProcessUniqueID() const override;
33 bool ReportsV8Memory() const;
34 int64 GetV8MemoryAllocated() const override;
35 int64 GetV8MemoryUsed() const override;
37 private:
38 // The Mojo service wrapper that will provide us with the V8 memory usage of
39 // the browser child process represented by this object.
40 scoped_ptr<ProcessResourceUsage> process_resources_sampler_;
42 // The allocated and used V8 memory (in bytes).
43 int64 v8_memory_allocated_;
44 int64 v8_memory_used_;
46 // The unique ID of the child process. It is not the PID of the process.
47 // See |content::ChildProcessData::id|.
48 const int unique_child_process_id_;
50 // The type of the child process. See |content::ProcessType| and
51 // |NaClTrustedProcessType|.
52 const int process_type_;
54 DISALLOW_COPY_AND_ASSIGN(ChildProcessTask);
57 } // namespace task_management
60 #endif // CHROME_BROWSER_TASK_MANAGEMENT_PROVIDERS_CHILD_PROCESS_TASK_H_