child_process_data.h revision cedac228d2dd51db4b79ea1e72c7f249408ee061
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
3// found in the LICENSE file.
4
5#ifndef CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_
6#define CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_
7
8#include "base/process/process.h"
9#include "base/strings/string16.h"
10#include "content/common/content_export.h"
11
12namespace content {
13
14// Holds information about a child process.
15struct ChildProcessData {
16  // The type of the process.
17  int process_type;
18
19  // The name of the process.  i.e. for plugins it might be Flash, while for
20  // for workers it might be the domain that it's from.
21  base::string16 name;
22
23  // The unique identifier for this child process. This identifier is NOT a
24  // process ID, and will be unique for all types of child process for
25  // one run of the browser.
26  int id;
27
28  // The handle to the process.
29  base::ProcessHandle handle;
30
31  explicit ChildProcessData(int process_type)
32      : process_type(process_type), id(0), handle(base::kNullProcessHandle) {
33  }
34};
35
36}  // namespace content
37
38#endif  // CONTENT_PUBLIC_BROWSER_CHILD_PROCESS_DATA_H_
39