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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.ht
ml | 105 // http://mail.gnome.org/archives/gnome-announce-list/2011-October/msg00041.ht
ml |
106 #if defined(TOOLKIT_GTK) | 106 #if defined(TOOLKIT_GTK) |
107 #if !(GLIB_CHECK_VERSION(2, 31, 0)) | 107 #if !(GLIB_CHECK_VERSION(2, 31, 0)) |
108 if (!g_thread_get_initialized()) { | 108 if (!g_thread_get_initialized()) { |
109 g_thread_init(NULL); | 109 g_thread_init(NULL); |
110 } | 110 } |
111 #endif | 111 #endif |
112 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); | 112 gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); |
113 #endif | 113 #endif |
114 | 114 |
115 ScopedVector<webkit::npapi::PluginGroup> plugin_groups; | 115 std::vector<webkit::WebPluginInfo> plugins; |
116 // TODO(bauerb): If we restart loading plug-ins, we might mess up the logic in | 116 // TODO(bauerb): If we restart loading plug-ins, we might mess up the logic in |
117 // PluginList::ShouldLoadPlugin due to missing the previously loaded plug-ins | 117 // PluginList::ShouldLoadPlugin due to missing the previously loaded plug-ins |
118 // in |plugin_groups|. | 118 // in |plugin_groups|. |
119 for (size_t i = 0; i < plugin_paths.size(); ++i) { | 119 for (size_t i = 0; i < plugin_paths.size(); ++i) { |
120 webkit::WebPluginInfo plugin; | 120 webkit::WebPluginInfo plugin; |
121 if (!plugin_list->LoadPlugin(plugin_paths[i], &plugin_groups, &plugin)) | 121 if (!plugin_list->LoadPluginIntoPluginList( |
| 122 plugin_paths[i], &plugins, &plugin)) |
122 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); | 123 Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); |
123 else | 124 else |
124 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); | 125 Send(new UtilityHostMsg_LoadedPlugin(i, plugin)); |
125 } | 126 } |
126 | 127 |
127 ReleaseProcessIfNeeded(); | 128 ReleaseProcessIfNeeded(); |
128 } | 129 } |
129 #endif | 130 #endif |
OLD | NEW |