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 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 CommandLine::ForCurrentProcess()->argv(); | 40 CommandLine::ForCurrentProcess()->argv(); |
41 int argc = args.size(); | 41 int argc = args.size(); |
42 scoped_array<char *> argv(new char *[argc + 1]); | 42 scoped_array<char *> argv(new char *[argc + 1]); |
43 for (size_t i = 0; i < args.size(); ++i) { | 43 for (size_t i = 0; i < args.size(); ++i) { |
44 // TODO(piman@google.com): can gtk_init modify argv? Just being safe | 44 // TODO(piman@google.com): can gtk_init modify argv? Just being safe |
45 // here. | 45 // here. |
46 argv[i] = strdup(args[i].c_str()); | 46 argv[i] = strdup(args[i].c_str()); |
47 } | 47 } |
48 argv[argc] = NULL; | 48 argv[argc] = NULL; |
49 char **argv_pointer = argv.get(); | 49 char **argv_pointer = argv.get(); |
| 50 |
| 51 // Flash has problems receiving clicks with newer GTKs due to the |
| 52 // client-side windows change. To be safe, we just always set the |
| 53 // backwards-compat environment variable. |
| 54 setenv("GDK_NATIVE_WINDOWS", "1", 1); |
| 55 |
50 gtk_init(&argc, &argv_pointer); | 56 gtk_init(&argc, &argv_pointer); |
51 for (size_t i = 0; i < args.size(); ++i) { | 57 for (size_t i = 0; i < args.size(); ++i) { |
52 free(argv[i]); | 58 free(argv[i]); |
53 } | 59 } |
54 } | 60 } |
55 #endif | 61 #endif |
56 | 62 |
57 PatchNPNFunctions(); | 63 PatchNPNFunctions(); |
58 | 64 |
59 // Preload the library to avoid loading, unloading then reloading | 65 // Preload the library to avoid loading, unloading then reloading |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 } | 244 } |
239 | 245 |
240 if (!result || net_error != net::OK) | 246 if (!result || net_error != net::OK) |
241 return false; | 247 return false; |
242 | 248 |
243 *proxy_list = proxy_result; | 249 *proxy_list = proxy_result; |
244 return true; | 250 return true; |
245 } | 251 } |
246 | 252 |
247 } // namespace webkit_glue | 253 } // namespace webkit_glue |
OLD | NEW |