| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include "chrome/browser/renderer_host/render_process_host.h" | 5 #include "chrome/browser/renderer_host/render_process_host.h" |
| 6 | 6 |
| 7 #include "base/rand_util.h" | 7 #include "base/rand_util.h" |
| 8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
| 9 #include "chrome/browser/child_process_security_policy.h" | 9 #include "chrome/browser/child_process_security_policy.h" |
| 10 #include "chrome/common/chrome_constants.h" | 10 #include "chrome/common/chrome_constants.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 IDMap<RenderProcessHost> all_hosts; | 77 IDMap<RenderProcessHost> all_hosts; |
| 78 | 78 |
| 79 } // namespace | 79 } // namespace |
| 80 | 80 |
| 81 bool RenderProcessHost::run_renderer_in_process_ = false; | 81 bool RenderProcessHost::run_renderer_in_process_ = false; |
| 82 | 82 |
| 83 RenderProcessHost::RenderProcessHost(Profile* profile) | 83 RenderProcessHost::RenderProcessHost(Profile* profile) |
| 84 : max_page_id_(-1), | 84 : max_page_id_(-1), |
| 85 pid_(-1), | 85 pid_(-1), |
| 86 profile_(profile), | 86 profile_(profile), |
| 87 sudden_termination_allowed_(true) { | 87 sudden_termination_allowed_(true), |
| 88 ignore_input_events_(false) { |
| 88 all_hosts.set_check_on_null_data(true); | 89 all_hosts.set_check_on_null_data(true); |
| 89 } | 90 } |
| 90 | 91 |
| 91 RenderProcessHost::~RenderProcessHost() { | 92 RenderProcessHost::~RenderProcessHost() { |
| 92 } | 93 } |
| 93 | 94 |
| 94 void RenderProcessHost::Attach(IPC::Channel::Listener* listener, | 95 void RenderProcessHost::Attach(IPC::Channel::Listener* listener, |
| 95 int routing_id) { | 96 int routing_id) { |
| 96 listeners_.AddWithID(listener, routing_id); | 97 listeners_.AddWithID(listener, routing_id); |
| 97 } | 98 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 } | 188 } |
| 188 | 189 |
| 189 pid_ = pid; | 190 pid_ = pid; |
| 190 all_hosts.AddWithID(this, pid); | 191 all_hosts.AddWithID(this, pid); |
| 191 } | 192 } |
| 192 | 193 |
| 193 void RenderProcessHost::RemoveFromList() { | 194 void RenderProcessHost::RemoveFromList() { |
| 194 if (all_hosts.Lookup(pid_)) | 195 if (all_hosts.Lookup(pid_)) |
| 195 all_hosts.Remove(pid_); | 196 all_hosts.Remove(pid_); |
| 196 } | 197 } |
| OLD | NEW |