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 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
16 #include "base/memory/linked_ptr.h" | 16 #include "base/memory/linked_ptr.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "chrome/common/extensions/extension_constants.h" | 19 #include "chrome/common/extensions/extension_constants.h" |
20 #include "chrome/common/extensions/extension_icon_set.h" | 20 #include "chrome/common/extensions/extension_icon_set.h" |
21 #include "chrome/common/extensions/extension_permission_set.h" | 21 #include "chrome/common/extensions/extension_permission_set.h" |
22 #include "chrome/common/extensions/user_script.h" | 22 #include "chrome/common/extensions/user_script.h" |
23 #include "chrome/common/extensions/url_pattern.h" | 23 #include "chrome/common/extensions/url_pattern.h" |
24 #include "chrome/common/extensions/url_pattern_set.h" | 24 #include "chrome/common/extensions/url_pattern_set.h" |
25 #include "googleurl/src/gurl.h" | 25 #include "googleurl/src/gurl.h" |
26 #include "ui/gfx/size.h" | 26 #include "ui/gfx/size.h" |
27 | 27 |
28 class DictionaryValue; | |
29 class ExtensionAction; | 28 class ExtensionAction; |
30 class ExtensionResource; | 29 class ExtensionResource; |
31 class ExtensionSidebarDefaults; | 30 class ExtensionSidebarDefaults; |
32 class FileBrowserHandler; | 31 class FileBrowserHandler; |
33 class ListValue; | |
34 class SkBitmap; | 32 class SkBitmap; |
35 class Version; | 33 class Version; |
36 | 34 |
| 35 namespace base { |
| 36 class DictionaryValue; |
| 37 class ListValue; |
| 38 } |
| 39 |
| 40 using base::DictionaryValue; |
| 41 using base::ListValue; |
| 42 |
37 // Represents a Chrome extension. | 43 // Represents a Chrome extension. |
38 class Extension : public base::RefCountedThreadSafe<Extension> { | 44 class Extension : public base::RefCountedThreadSafe<Extension> { |
39 public: | 45 public: |
40 typedef std::map<const std::string, GURL> URLOverrideMap; | 46 typedef std::map<const std::string, GURL> URLOverrideMap; |
41 typedef std::vector<std::string> ScriptingWhitelist; | 47 typedef std::vector<std::string> ScriptingWhitelist; |
42 typedef std::vector<linked_ptr<FileBrowserHandler> > FileBrowserHandlerList; | 48 typedef std::vector<linked_ptr<FileBrowserHandler> > FileBrowserHandlerList; |
43 | 49 |
44 // What an extension was loaded from. | 50 // What an extension was loaded from. |
45 // NOTE: These values are stored as integers in the preferences and used | 51 // NOTE: These values are stored as integers in the preferences and used |
46 // in histograms so don't remove or reorder existing items. Just append | 52 // in histograms so don't remove or reorder existing items. Just append |
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 // Was the extension already disabled? | 855 // Was the extension already disabled? |
850 bool already_disabled; | 856 bool already_disabled; |
851 | 857 |
852 // The extension being unloaded - this should always be non-NULL. | 858 // The extension being unloaded - this should always be non-NULL. |
853 const Extension* extension; | 859 const Extension* extension; |
854 | 860 |
855 UnloadedExtensionInfo(const Extension* extension, Reason reason); | 861 UnloadedExtensionInfo(const Extension* extension, Reason reason); |
856 }; | 862 }; |
857 | 863 |
858 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 864 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |