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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 #if defined(OS_LINUX) | |
9 #define MOZ_X11 1 | |
10 #endif | |
11 | 8 |
12 #include "webkit/glue/plugins/plugin_instance.h" | 9 #include "webkit/glue/plugins/plugin_instance.h" |
13 | 10 |
14 #include "base/file_util.h" | 11 #include "base/file_util.h" |
15 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
16 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
17 #include "base/string_util.h" | 14 #include "base/string_util.h" |
18 #include "base/thread_local.h" | 15 #include "base/thread_local.h" |
19 #include "webkit/glue/glue_util.h" | 16 #include "webkit/glue/glue_util.h" |
20 #include "webkit/glue/webplugin.h" | 17 #include "webkit/glue/webplugin.h" |
(...skipping 13 matching lines...) Expand all Loading... |
34 // pass this instance to the service manager (MozillaExtensionApi) created as a | 31 // pass this instance to the service manager (MozillaExtensionApi) created as a |
35 // result of NPN_GetValue in the context of NP_Initialize. | 32 // result of NPN_GetValue in the context of NP_Initialize. |
36 static base::LazyInstance<base::ThreadLocalPointer<PluginInstance> > lazy_tls( | 33 static base::LazyInstance<base::ThreadLocalPointer<PluginInstance> > lazy_tls( |
37 base::LINKER_INITIALIZED); | 34 base::LINKER_INITIALIZED); |
38 | 35 |
39 PluginInstance::PluginInstance(PluginLib *plugin, const std::string &mime_type) | 36 PluginInstance::PluginInstance(PluginLib *plugin, const std::string &mime_type) |
40 : plugin_(plugin), | 37 : plugin_(plugin), |
41 npp_(0), | 38 npp_(0), |
42 host_(PluginHost::Singleton()), | 39 host_(PluginHost::Singleton()), |
43 npp_functions_(plugin->functions()), | 40 npp_functions_(plugin->functions()), |
44 #if defined(OS_WIN) | 41 window_handle_(0), |
45 hwnd_(0), | |
46 #endif | |
47 windowless_(false), | 42 windowless_(false), |
48 transparent_(true), | 43 transparent_(true), |
49 webplugin_(0), | 44 webplugin_(0), |
50 mime_type_(mime_type), | 45 mime_type_(mime_type), |
51 get_notify_data_(NULL), | 46 get_notify_data_(NULL), |
52 use_mozilla_user_agent_(false), | 47 use_mozilla_user_agent_(false), |
53 message_loop_(MessageLoop::current()), | 48 message_loop_(MessageLoop::current()), |
54 load_manually_(false), | 49 load_manually_(false), |
55 in_close_streams_(false) { | 50 in_close_streams_(false) { |
56 npp_ = new NPP_t(); | 51 npp_ = new NPP_t(); |
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 stream->url, range_info.c_str(), | 503 stream->url, range_info.c_str(), |
509 reinterpret_cast<intptr_t>(plugin_stream), | 504 reinterpret_cast<intptr_t>(plugin_stream), |
510 plugin_stream->notify_needed(), | 505 plugin_stream->notify_needed(), |
511 reinterpret_cast<intptr_t>(plugin_stream->notify_data())); | 506 reinterpret_cast<intptr_t>(plugin_stream->notify_data())); |
512 break; | 507 break; |
513 } | 508 } |
514 } | 509 } |
515 } | 510 } |
516 | 511 |
517 } // namespace NPAPI | 512 } // namespace NPAPI |
OLD | NEW |