| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/plugin/plugin_thread.h" | 5 #include "chrome/plugin/plugin_thread.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_LINUX) | 9 #if defined(OS_LINUX) |
| 10 #include <gtk/gtk.h> | 10 #include <gtk/gtk.h> |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 if (!plugin_thread) | 200 if (!plugin_thread) |
| 201 return false; | 201 return false; |
| 202 | 202 |
| 203 plugin_thread->Send( | 203 plugin_thread->Send( |
| 204 new PluginProcessHostMsg_GetPluginFinderUrl(plugin_finder_url)); | 204 new PluginProcessHostMsg_GetPluginFinderUrl(plugin_finder_url)); |
| 205 DCHECK(!plugin_finder_url->empty()); | 205 DCHECK(!plugin_finder_url->empty()); |
| 206 return true; | 206 return true; |
| 207 } | 207 } |
| 208 | 208 |
| 209 bool IsDefaultPluginEnabled() { | 209 bool IsDefaultPluginEnabled() { |
| 210 #if defined(OS_WIN) || defined(OS_MACOSX) | 210 #if defined(OS_WIN) |
| 211 return true; | 211 return true; |
| 212 #elif defined(OS_LINUX) | 212 #elif defined(OS_LINUX) |
| 213 // http://code.google.com/p/chromium/issues/detail?id=10952 | 213 // http://code.google.com/p/chromium/issues/detail?id=10952 |
| 214 return false; | 214 return false; |
| 215 #elif defined(OS_MACOSX) |
| 216 // http://code.google.com/p/chromium/issues/detail?id=17392 |
| 217 return false; |
| 215 #endif | 218 #endif |
| 216 } | 219 } |
| 217 | 220 |
| 218 // Dispatch the resolve proxy resquest to the right code, depending on which | 221 // Dispatch the resolve proxy resquest to the right code, depending on which |
| 219 // process the plugin is running in {renderer, browser, plugin}. | 222 // process the plugin is running in {renderer, browser, plugin}. |
| 220 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { | 223 bool FindProxyForUrl(const GURL& url, std::string* proxy_list) { |
| 221 int net_error; | 224 int net_error; |
| 222 std::string proxy_result; | 225 std::string proxy_result; |
| 223 | 226 |
| 224 bool result; | 227 bool result; |
| 225 if (IsPluginProcess()) { | 228 if (IsPluginProcess()) { |
| 226 result = PluginThread::current()->Send( | 229 result = PluginThread::current()->Send( |
| 227 new PluginProcessHostMsg_ResolveProxy(url, &net_error, &proxy_result)); | 230 new PluginProcessHostMsg_ResolveProxy(url, &net_error, &proxy_result)); |
| 228 } else { | 231 } else { |
| 229 result = RenderThread::current()->Send( | 232 result = RenderThread::current()->Send( |
| 230 new ViewHostMsg_ResolveProxy(url, &net_error, &proxy_result)); | 233 new ViewHostMsg_ResolveProxy(url, &net_error, &proxy_result)); |
| 231 } | 234 } |
| 232 | 235 |
| 233 if (!result || net_error != net::OK) | 236 if (!result || net_error != net::OK) |
| 234 return false; | 237 return false; |
| 235 | 238 |
| 236 *proxy_list = proxy_result; | 239 *proxy_list = proxy_result; |
| 237 return true; | 240 return true; |
| 238 } | 241 } |
| 239 | 242 |
| 240 } // namespace webkit_glue | 243 } // namespace webkit_glue |
| OLD | NEW |