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 "webkit/plugins/npapi/plugin_lib.h" | 5 #include "content/child/npapi/plugin_lib.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/metrics/stats_counters.h" | 10 #include "base/metrics/stats_counters.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "webkit/plugins/npapi/plugin_host.h" | 12 #include "content/child/npapi/plugin_host.h" |
13 #include "webkit/plugins/npapi/plugin_instance.h" | 13 #include "content/child/npapi/plugin_instance.h" |
14 #include "webkit/plugins/npapi/plugin_list.h" | 14 #include "content/common/plugin_list.h" |
15 | 15 |
16 namespace webkit { | 16 namespace content { |
17 namespace npapi { | |
18 | 17 |
19 const char kPluginLibrariesLoadedCounter[] = "PluginLibrariesLoaded"; | 18 const char kPluginLibrariesLoadedCounter[] = "PluginLibrariesLoaded"; |
20 const char kPluginInstancesActiveCounter[] = "PluginInstancesActive"; | 19 const char kPluginInstancesActiveCounter[] = "PluginInstancesActive"; |
21 | 20 |
22 // A list of all the instantiated plugins. | 21 // A list of all the instantiated plugins. |
23 static std::vector<scoped_refptr<PluginLib> >* g_loaded_libs; | 22 static std::vector<scoped_refptr<PluginLib> >* g_loaded_libs; |
24 | 23 |
25 PluginLib* PluginLib::CreatePluginLib(const base::FilePath& filename) { | 24 PluginLib* PluginLib::CreatePluginLib(const base::FilePath& filename) { |
26 // We can only have one PluginLib object per plugin as it controls the per | 25 // We can only have one PluginLib object per plugin as it controls the per |
27 // instance function calls (i.e. NP_Initialize and NP_Shutdown). So we keep | 26 // instance function calls (i.e. NP_Initialize and NP_Shutdown). So we keep |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 } | 325 } |
327 } | 326 } |
328 | 327 |
329 void PluginLib::Shutdown() { | 328 void PluginLib::Shutdown() { |
330 if (initialized_) { | 329 if (initialized_) { |
331 NP_Shutdown(); | 330 NP_Shutdown(); |
332 initialized_ = false; | 331 initialized_ = false; |
333 } | 332 } |
334 } | 333 } |
335 | 334 |
336 } // namespace npapi | 335 } // namespace content |
337 } // namespace webkit | |
OLD | NEW |