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 CONTENT_COMMON_PLUGIN_LIST_H_ | 5 #ifndef CONTENT_COMMON_PLUGIN_LIST_H_ |
6 #define CONTENT_COMMON_PLUGIN_LIST_H_ | 6 #define CONTENT_COMMON_PLUGIN_LIST_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 virtual ~PluginList(); | 125 virtual ~PluginList(); |
126 | 126 |
127 private: | 127 private: |
128 enum LoadingState { | 128 enum LoadingState { |
129 LOADING_STATE_NEEDS_REFRESH, | 129 LOADING_STATE_NEEDS_REFRESH, |
130 LOADING_STATE_REFRESHING, | 130 LOADING_STATE_REFRESHING, |
131 LOADING_STATE_UP_TO_DATE, | 131 LOADING_STATE_UP_TO_DATE, |
132 }; | 132 }; |
133 | 133 |
134 friend class PluginListTest; | 134 friend class PluginListTest; |
135 friend struct base::DefaultLazyInstanceTraits<PluginList>; | 135 friend struct base::LazyInstanceTraitsBase<PluginList>; |
136 | 136 |
137 PluginList(); | 137 PluginList(); |
138 | 138 |
139 // Load all plugins from the default plugins directory. | 139 // Load all plugins from the default plugins directory. |
140 void LoadPlugins(); | 140 void LoadPlugins(); |
141 | 141 |
142 // Returns true if the given plugin supports a given file extension. | 142 // Returns true if the given plugin supports a given file extension. |
143 // |extension| should be all lower case. If |mime_type| is not NULL, it will | 143 // |extension| should be all lower case. If |mime_type| is not NULL, it will |
144 // be set to the MIME type if found. The MIME type which corresponds to the | 144 // be set to the MIME type if found. The MIME type which corresponds to the |
145 // extension is optionally returned back. | 145 // extension is optionally returned back. |
(...skipping 29 matching lines...) Expand all Loading... |
175 // Need synchronization for the above members since this object can be | 175 // Need synchronization for the above members since this object can be |
176 // accessed on multiple threads. | 176 // accessed on multiple threads. |
177 base::Lock lock_; | 177 base::Lock lock_; |
178 | 178 |
179 DISALLOW_COPY_AND_ASSIGN(PluginList); | 179 DISALLOW_COPY_AND_ASSIGN(PluginList); |
180 }; | 180 }; |
181 | 181 |
182 } // namespace content | 182 } // namespace content |
183 | 183 |
184 #endif // CONTENT_COMMON_PLUGIN_LIST_H_ | 184 #endif // CONTENT_COMMON_PLUGIN_LIST_H_ |
OLD | NEW |