| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/plugin/plugin_thread.h" | 5 #include "content/plugin/plugin_thread.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(TOOLKIT_USES_GTK) | 9 #if defined(TOOLKIT_USES_GTK) |
| 10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
| 11 #elif defined(OS_MACOSX) | 11 #elif defined(OS_MACOSX) |
| 12 #include <CoreFoundation/CoreFoundation.h> | 12 #include <CoreFoundation/CoreFoundation.h> |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
| 19 #include "base/lazy_instance.h" | 19 #include "base/lazy_instance.h" |
| 20 #include "base/process_util.h" | 20 #include "base/process_util.h" |
| 21 #include "base/threading/thread_local.h" | 21 #include "base/threading/thread_local.h" |
| 22 #include "content/common/child_process.h" | 22 #include "content/common/child_process.h" |
| 23 #include "content/common/content_switches.h" | 23 #include "content/common/content_switches.h" |
| 24 #include "content/common/child_process_messages.h" | |
| 25 #include "content/common/plugin_messages.h" | 24 #include "content/common/plugin_messages.h" |
| 26 #include "content/plugin/content_plugin_client.h" | 25 #include "content/plugin/content_plugin_client.h" |
| 27 #include "content/plugin/npobject_util.h" | 26 #include "content/plugin/npobject_util.h" |
| 28 #include "ipc/ipc_channel_handle.h" | 27 #include "ipc/ipc_channel_handle.h" |
| 29 #include "net/base/net_errors.h" | |
| 30 #include "webkit/glue/webkit_glue.h" | 28 #include "webkit/glue/webkit_glue.h" |
| 31 #include "webkit/plugins/npapi/plugin_lib.h" | 29 #include "webkit/plugins/npapi/plugin_lib.h" |
| 32 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 30 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
| 33 | 31 |
| 34 #if defined(TOOLKIT_USES_GTK) | 32 #if defined(TOOLKIT_USES_GTK) |
| 35 #include "ui/gfx/gtk_util.h" | 33 #include "ui/gfx/gtk_util.h" |
| 36 #endif | 34 #endif |
| 37 | 35 |
| 38 #if defined(USE_X11) | 36 #if defined(USE_X11) |
| 39 #include "ui/base/x/x11_util.h" | 37 #include "ui/base/x/x11_util.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 #endif | 161 #endif |
| 164 channel->set_incognito(incognito); | 162 channel->set_incognito(incognito); |
| 165 } | 163 } |
| 166 | 164 |
| 167 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); | 165 Send(new PluginProcessHostMsg_ChannelCreated(channel_handle)); |
| 168 } | 166 } |
| 169 | 167 |
| 170 void PluginThread::OnNotifyRenderersOfPendingShutdown() { | 168 void PluginThread::OnNotifyRenderersOfPendingShutdown() { |
| 171 PluginChannel::NotifyRenderersOfPendingShutdown(); | 169 PluginChannel::NotifyRenderersOfPendingShutdown(); |
| 172 } | 170 } |
| 173 | |
| 174 namespace webkit_glue { | |
| 175 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { | |
| 176 int net_error; | |
| 177 std::string proxy_result; | |
| 178 | |
| 179 bool result = ChildThread::current()->Send( | |
| 180 new ChildProcessHostMsg_ResolveProxy(url, &net_error, &proxy_result)); | |
| 181 if (!result || net_error != net::OK) | |
| 182 return false; | |
| 183 | |
| 184 *proxy_list = proxy_result; | |
| 185 return true; | |
| 186 } | |
| 187 | |
| 188 } // namespace webkit_glue | |
| OLD | NEW |