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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.ht
ml | 136 // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.ht
ml |
137 #if defined(TOOLKIT_GTK) | 137 #if defined(TOOLKIT_GTK) |
138 #if !(GLIB_CHECK_VERSION(2, 31, 0)) | 138 #if !(GLIB_CHECK_VERSION(2, 31, 0)) |
139 if (!g_thread_get_initialized()) { | 139 if (!g_thread_get_initialized()) { |
140 g_thread_init(NULL); | 140 g_thread_init(NULL); |
141 } | 141 } |
142 #endif | 142 #endif |
143 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); | 143 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); |
144 #endif | 144 #endif |
145 | 145 |
146 std::vector<webkit::WebPluginInfo> plugins; | 146 std::vector<WebPluginInfo> plugins; |
147 // TODO(bauerb): If we restart loading plug-ins, we might mess up the logic in | 147 // TODO(bauerb): If we restart loading plug-ins, we might mess up the logic in |
148 // PluginList::ShouldLoadPlugin due to missing the previously loaded plug-ins | 148 // PluginList::ShouldLoadPlugin due to missing the previously loaded plug-ins |
149 // in |plugin_groups|. | 149 // in |plugin_groups|. |
150 for (size_t i = 0; i < plugin_paths.size(); ++i) { | 150 for (size_t i = 0; i < plugin_paths.size(); ++i) { |
151 webkit::WebPluginInfo plugin; | 151 WebPluginInfo plugin; |
152 if (!plugin_list->LoadPluginIntoPluginList( | 152 if (!plugin_list->LoadPluginIntoPluginList( |
153 plugin_paths[i], &plugins, &plugin)) | 153 plugin_paths[i], &plugins, &plugin)) |
154 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); | 154 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); |
155 else | 155 else |
156 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); | 156 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); |
157 } | 157 } |
158 | 158 |
159 ReleaseProcessIfNeeded(); | 159 ReleaseProcessIfNeeded(); |
160 } | 160 } |
161 #endif | 161 #endif |
162 | 162 |
163 } // namespace content | 163 } // namespace content |
OLD | NEW |