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 "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
20 #include "chrome/common/extensions/extension_constants.h" | 20 #include "chrome/common/extensions/extension_constants.h" |
21 #include "chrome/common/extensions/extension_icon_set.h" | 21 #include "chrome/common/extensions/extension_icon_set.h" |
22 #include "chrome/common/extensions/extension_permission_set.h" | 22 #include "chrome/common/extensions/extension_permission_set.h" |
23 #include "chrome/common/extensions/manifest.h" | 23 #include "chrome/common/extensions/manifest.h" |
24 #include "chrome/common/extensions/user_script.h" | 24 #include "chrome/common/extensions/user_script.h" |
25 #include "chrome/common/extensions/url_pattern.h" | 25 #include "chrome/common/extensions/url_pattern.h" |
26 #include "chrome/common/extensions/url_pattern_set.h" | 26 #include "chrome/common/extensions/url_pattern_set.h" |
27 #include "googleurl/src/gurl.h" | 27 #include "googleurl/src/gurl.h" |
28 #include "ui/gfx/size.h" | 28 #include "ui/gfx/size.h" |
29 #include "webkit/glue/web_intent_service_data.h" | |
30 | 29 |
31 class ExtensionAction; | 30 class ExtensionAction; |
32 class ExtensionResource; | 31 class ExtensionResource; |
33 class ExtensionSidebarDefaults; | 32 class ExtensionSidebarDefaults; |
34 class FileBrowserHandler; | 33 class FileBrowserHandler; |
35 class SkBitmap; | 34 class SkBitmap; |
36 class Version; | 35 class Version; |
37 | 36 |
38 namespace base { | 37 namespace base { |
39 class DictionaryValue; | 38 class DictionaryValue; |
40 class ListValue; | 39 class ListValue; |
41 } | 40 } |
42 | 41 |
| 42 namespace webkit_glue { |
| 43 struct WebIntentServiceData; |
| 44 } |
| 45 |
43 // Represents a Chrome extension. | 46 // Represents a Chrome extension. |
44 class Extension : public base::RefCountedThreadSafe<Extension> { | 47 class Extension : public base::RefCountedThreadSafe<Extension> { |
45 public: | 48 public: |
46 typedef std::map<const std::string, GURL> URLOverrideMap; | 49 typedef std::map<const std::string, GURL> URLOverrideMap; |
47 typedef std::vector<std::string> ScriptingWhitelist; | 50 typedef std::vector<std::string> ScriptingWhitelist; |
48 typedef std::vector<linked_ptr<FileBrowserHandler> > FileBrowserHandlerList; | 51 typedef std::vector<linked_ptr<FileBrowserHandler> > FileBrowserHandlerList; |
49 | 52 |
50 // What an extension was loaded from. | 53 // What an extension was loaded from. |
51 // NOTE: These values are stored as integers in the preferences and used | 54 // NOTE: These values are stored as integers in the preferences and used |
52 // in histograms so don't remove or reorder existing items. Just append | 55 // in histograms so don't remove or reorder existing items. Just append |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 // only contain the removed permissions. | 935 // only contain the removed permissions. |
933 const ExtensionPermissionSet* permissions; | 936 const ExtensionPermissionSet* permissions; |
934 | 937 |
935 UpdatedExtensionPermissionsInfo( | 938 UpdatedExtensionPermissionsInfo( |
936 const Extension* extension, | 939 const Extension* extension, |
937 const ExtensionPermissionSet* permissions, | 940 const ExtensionPermissionSet* permissions, |
938 Reason reason); | 941 Reason reason); |
939 }; | 942 }; |
940 | 943 |
941 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 944 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |