| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "content/ppapi_plugin/plugin_process_dispatcher.h" | 5 #include "content/ppapi_plugin/plugin_process_dispatcher.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "content/common/child_process.h" | 9 #include "content/child/child_process.h" |
| 10 | 10 |
| 11 namespace content { | 11 namespace content { |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 // How long we wait before releasing the plugin process. | 14 // How long we wait before releasing the plugin process. |
| 15 const int kPluginReleaseTimeSeconds = 30; | 15 const int kPluginReleaseTimeSeconds = 30; |
| 16 | 16 |
| 17 } // namespace | 17 } // namespace |
| 18 | 18 |
| 19 PluginProcessDispatcher::PluginProcessDispatcher( | 19 PluginProcessDispatcher::PluginProcessDispatcher( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 33 // source and destination page of a navigation. We don't want to tear down | 33 // source and destination page of a navigation. We don't want to tear down |
| 34 // and re-start processes each time in these cases. | 34 // and re-start processes each time in these cases. |
| 35 base::MessageLoop::current()->PostDelayedTask( | 35 base::MessageLoop::current()->PostDelayedTask( |
| 36 FROM_HERE, | 36 FROM_HERE, |
| 37 base::Bind(&ChildProcess::ReleaseProcess, | 37 base::Bind(&ChildProcess::ReleaseProcess, |
| 38 base::Unretained(ChildProcess::current())), | 38 base::Unretained(ChildProcess::current())), |
| 39 base::TimeDelta::FromSeconds(kPluginReleaseTimeSeconds)); | 39 base::TimeDelta::FromSeconds(kPluginReleaseTimeSeconds)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // namespace content | 42 } // namespace content |
| OLD | NEW |