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/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 void UtilityThreadImpl::OnBatchModeStarted() { | 89 void UtilityThreadImpl::OnBatchModeStarted() { |
90 batch_mode_ = true; | 90 batch_mode_ = true; |
91 } | 91 } |
92 | 92 |
93 void UtilityThreadImpl::OnBatchModeFinished() { | 93 void UtilityThreadImpl::OnBatchModeFinished() { |
94 ChildProcess::current()->ReleaseProcess(); | 94 ChildProcess::current()->ReleaseProcess(); |
95 } | 95 } |
96 | 96 |
97 #if defined(OS_POSIX) | 97 #if defined(OS_POSIX) |
98 void UtilityThreadImpl::OnLoadPlugins( | 98 void UtilityThreadImpl::OnLoadPlugins( |
99 const std::vector<FilePath>& plugin_paths) { | 99 const std::vector<base::FilePath>& plugin_paths) { |
100 webkit::npapi::PluginList* plugin_list = | 100 webkit::npapi::PluginList* plugin_list = |
101 webkit::npapi::PluginList::Singleton(); | 101 webkit::npapi::PluginList::Singleton(); |
102 | 102 |
103 // On Linux, some plugins expect the browser to have loaded glib/gtk. Do that | 103 // On Linux, some plugins expect the browser to have loaded glib/gtk. Do that |
104 // before attempting to call into the plugin. | 104 // before attempting to call into the plugin. |
105 // g_thread_init API is deprecated since glib 2.31.0, please see release note: | 105 // g_thread_init API is deprecated since glib 2.31.0, please see release note: |
106 // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.ht
ml | 106 // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.ht
ml |
107 #if defined(TOOLKIT_GTK) | 107 #if defined(TOOLKIT_GTK) |
108 #if !(GLIB_CHECK_VERSION(2, 31, 0)) | 108 #if !(GLIB_CHECK_VERSION(2, 31, 0)) |
109 if (!g_thread_get_initialized()) { | 109 if (!g_thread_get_initialized()) { |
(...skipping 14 matching lines...) Expand all Loading... |
124 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); | 124 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); |
125 else | 125 else |
126 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); | 126 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); |
127 } | 127 } |
128 | 128 |
129 ReleaseProcessIfNeeded(); | 129 ReleaseProcessIfNeeded(); |
130 } | 130 } |
131 #endif | 131 #endif |
132 | 132 |
133 } // namespace content | 133 } // namespace content |
OLD | NEW |