| 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/utility/utility_thread_impl.h" | 5 #include "content/utility/utility_thread_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 UtilityThreadImpl::UtilityThreadImpl(const std::string& channel_name) | 45 UtilityThreadImpl::UtilityThreadImpl(const std::string& channel_name) |
| 46 : ChildThread(channel_name), | 46 : ChildThread(channel_name), |
| 47 single_process_(true) { | 47 single_process_(true) { |
| 48 Init(); | 48 Init(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 UtilityThreadImpl::~UtilityThreadImpl() { | 51 UtilityThreadImpl::~UtilityThreadImpl() { |
| 52 } | 52 } |
| 53 | 53 |
| 54 void UtilityThreadImpl::Shutdown() { | 54 void UtilityThreadImpl::Shutdown() { |
| 55 ChildThread::Shutdown(); |
| 56 |
| 55 if (!single_process_) | 57 if (!single_process_) |
| 56 WebKit::shutdown(); | 58 WebKit::shutdown(); |
| 57 } | 59 } |
| 58 | 60 |
| 59 bool UtilityThreadImpl::Send(IPC::Message* msg) { | 61 bool UtilityThreadImpl::Send(IPC::Message* msg) { |
| 60 return ChildThread::Send(msg); | 62 return ChildThread::Send(msg); |
| 61 } | 63 } |
| 62 | 64 |
| 63 void UtilityThreadImpl::ReleaseProcessIfNeeded() { | 65 void UtilityThreadImpl::ReleaseProcessIfNeeded() { |
| 64 if (batch_mode_) | 66 if (batch_mode_) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); | 156 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); |
| 155 else | 157 else |
| 156 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); | 158 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); |
| 157 } | 159 } |
| 158 | 160 |
| 159 ReleaseProcessIfNeeded(); | 161 ReleaseProcessIfNeeded(); |
| 160 } | 162 } |
| 161 #endif | 163 #endif |
| 162 | 164 |
| 163 } // namespace content | 165 } // namespace content |
| OLD | NEW |