OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ |
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ | 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
17 #include "webkit/plugins/webplugininfo.h" | 17 #include "content/public/common/webplugininfo.h" |
18 | 18 |
19 namespace base { | 19 namespace base { |
20 class DictionaryValue; | 20 class DictionaryValue; |
21 } | 21 } |
22 | 22 |
23 class GURL; | 23 class GURL; |
24 class PluginMetadata; | 24 class PluginMetadata; |
25 class PrefRegistrySimple; | 25 class PrefRegistrySimple; |
26 | 26 |
27 #if defined(ENABLE_PLUGIN_INSTALLATION) | 27 #if defined(ENABLE_PLUGIN_INSTALLATION) |
(...skipping 30 matching lines...) Expand all Loading... |
58 bool FindPluginWithIdentifier(const std::string& identifier, | 58 bool FindPluginWithIdentifier(const std::string& identifier, |
59 PluginInstaller** installer, | 59 PluginInstaller** installer, |
60 scoped_ptr<PluginMetadata>* plugin_metadata); | 60 scoped_ptr<PluginMetadata>* plugin_metadata); |
61 #endif | 61 #endif |
62 | 62 |
63 // Returns the plug-in name with the given identifier. | 63 // Returns the plug-in name with the given identifier. |
64 string16 FindPluginNameWithIdentifier(const std::string& identifier); | 64 string16 FindPluginNameWithIdentifier(const std::string& identifier); |
65 | 65 |
66 // Gets plug-in metadata using |plugin|. | 66 // Gets plug-in metadata using |plugin|. |
67 scoped_ptr<PluginMetadata> GetPluginMetadata( | 67 scoped_ptr<PluginMetadata> GetPluginMetadata( |
68 const webkit::WebPluginInfo& plugin); | 68 const content::WebPluginInfo& plugin); |
69 | 69 |
70 private: | 70 private: |
71 friend struct DefaultSingletonTraits<PluginFinder>; | 71 friend struct DefaultSingletonTraits<PluginFinder>; |
72 friend class Singleton<PluginFinder>; | 72 friend class Singleton<PluginFinder>; |
73 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, JsonSyntax); | 73 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, JsonSyntax); |
74 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, PluginGroups); | 74 FRIEND_TEST_ALL_PREFIXES(PluginFinderTest, PluginGroups); |
75 | 75 |
76 PluginFinder(); | 76 PluginFinder(); |
77 ~PluginFinder(); | 77 ~PluginFinder(); |
78 | 78 |
(...skipping 13 matching lines...) Expand all Loading... |
92 int version_; | 92 int version_; |
93 | 93 |
94 // Synchronization for the above member variables is | 94 // Synchronization for the above member variables is |
95 // required since multiple threads can be accessing them concurrently. | 95 // required since multiple threads can be accessing them concurrently. |
96 base::Lock mutex_; | 96 base::Lock mutex_; |
97 | 97 |
98 DISALLOW_COPY_AND_ASSIGN(PluginFinder); | 98 DISALLOW_COPY_AND_ASSIGN(PluginFinder); |
99 }; | 99 }; |
100 | 100 |
101 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ | 101 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_ |
OLD | NEW |