Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(523)

Side by Side Diff: content/common/child_process_info.h

Issue 6612040: Move ChildProcessHost and ChildProcessInfo to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/child_process_host.cc ('k') | content/common/child_process_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_COMMON_CHILD_PROCESS_INFO_H_ 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_INFO_H_
6 #define CHROME_COMMON_CHILD_PROCESS_INFO_H_ 6 #define CONTENT_COMMON_CHILD_PROCESS_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/process.h" 11 #include "base/process.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 13
14 // Holds information about a child process. 14 // Holds information about a child process.
15 class ChildProcessInfo { 15 class ChildProcessInfo {
16 public: 16 public:
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 void SetProcessBackgrounded() const { process_.SetProcessBackgrounded(true); } 79 void SetProcessBackgrounded() const { process_.SetProcessBackgrounded(true); }
80 80
81 // Returns an English name of the process type, should only be used for non 81 // Returns an English name of the process type, should only be used for non
82 // user-visible strings, or debugging pages like about:memory. 82 // user-visible strings, or debugging pages like about:memory.
83 static std::string GetFullTypeNameInEnglish(ProcessType type, 83 static std::string GetFullTypeNameInEnglish(ProcessType type,
84 RendererProcessType rtype); 84 RendererProcessType rtype);
85 static std::string GetTypeNameInEnglish(ProcessType type); 85 static std::string GetTypeNameInEnglish(ProcessType type);
86 static std::string GetRendererTypeNameInEnglish(RendererProcessType type); 86 static std::string GetRendererTypeNameInEnglish(RendererProcessType type);
87 87
88 // Returns a localized title for the child process. For example, a plugin
89 // process would be "Plug-in: Flash" when name is "Flash".
90 string16 GetLocalizedTitle() const;
91
92 // We define the < operator so that the ChildProcessInfo can be used as a key 88 // We define the < operator so that the ChildProcessInfo can be used as a key
93 // in a std::map. 89 // in a std::map.
94 bool operator <(const ChildProcessInfo& rhs) const { 90 bool operator <(const ChildProcessInfo& rhs) const {
95 if (process_.handle() != rhs.process_.handle()) 91 if (process_.handle() != rhs.process_.handle())
96 return process_ .handle() < rhs.process_.handle(); 92 return process_ .handle() < rhs.process_.handle();
97 return false; 93 return false;
98 } 94 }
99 95
100 bool operator ==(const ChildProcessInfo& rhs) const { 96 bool operator ==(const ChildProcessInfo& rhs) const {
101 return process_.handle() == rhs.process_.handle(); 97 return process_.handle() == rhs.process_.handle();
(...skipping 29 matching lines...) Expand all
131 ProcessType type_; 127 ProcessType type_;
132 RendererProcessType renderer_type_; 128 RendererProcessType renderer_type_;
133 std::wstring name_; 129 std::wstring name_;
134 std::wstring version_; 130 std::wstring version_;
135 int id_; 131 int id_;
136 132
137 // The handle to the process. 133 // The handle to the process.
138 mutable base::Process process_; 134 mutable base::Process process_;
139 }; 135 };
140 136
141 #endif // CHROME_COMMON_CHILD_PROCESS_INFO_H_ 137 #endif // CONTENT_COMMON_CHILD_PROCESS_INFO_H_
OLDNEW
« no previous file with comments | « content/common/child_process_host.cc ('k') | content/common/child_process_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698