Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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> |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 // Return the update url used by gallery/webstore extensions. | 116 // Return the update url used by gallery/webstore extensions. |
| 117 static GURL GalleryUpdateUrl(bool secure); | 117 static GURL GalleryUpdateUrl(bool secure); |
| 118 | 118 |
| 119 // The install message id for |permission|. Returns 0 if none exists. | 119 // The install message id for |permission|. Returns 0 if none exists. |
| 120 static int GetPermissionMessageId(const std::string& permission); | 120 static int GetPermissionMessageId(const std::string& permission); |
| 121 | 121 |
| 122 // Returns the full list of permission messages that this extension | 122 // Returns the full list of permission messages that this extension |
| 123 // should display at install time. | 123 // should display at install time. |
| 124 std::vector<string16> GetPermissionMessages() const; | 124 std::vector<string16> GetPermissionMessages() const; |
| 125 | 125 |
| 126 // Returns the distinct hosts that should be displayed in the install UI. This | 126 // Returns the distinct hosts that can be displayed in the install UI or be |
| 127 // discards some of the detail that is present in the manifest to make it as | 127 // used for privilege comparisons. This discards some of the detail that is |
| 128 // easy as possible to process by users. In particular we disregard the scheme | 128 // present in the manifest to make it as easy as possible to process by users. |
| 129 // and path components of URLPatterns and de-dupe the result. | 129 // In particular we disregard the scheme and path components of URLPatterns |
| 130 // and de-dupe the result. | |
|
Erik does not do reviews
2010/12/03 17:56:42
...the result, including based on filtering out co
jstritar
2010/12/03 21:52:55
Done.
| |
| 131 // NOTE: If using the hosts for privilege comparisons, |include_rcd| must be | |
|
Erik does not do reviews
2010/12/03 17:56:42
Rather than explaining it as a NOTE like this, I'd
jstritar
2010/12/03 21:52:55
Done.
| |
| 132 // set to false so that the RCDs are stripped off. This ensures that | |
| 133 // equivalent |host_patterns| reliably return the same distinct hosts, | |
| 134 // regardless of the pattern order or presence of additional domains with | |
| 135 // the same host but other RCDs. | |
| 130 static std::vector<std::string> GetDistinctHosts( | 136 static std::vector<std::string> GetDistinctHosts( |
| 131 const URLPatternList& host_patterns); | 137 const URLPatternList& host_patterns, bool include_rcd); |
| 132 std::vector<std::string> GetDistinctHosts() const; | 138 std::vector<std::string> GetDistinctHosts(bool include_rcd) const; |
| 133 | 139 |
| 134 // Icon sizes used by the extension system. | 140 // Icon sizes used by the extension system. |
| 135 static const int kIconSizes[]; | 141 static const int kIconSizes[]; |
| 136 | 142 |
| 137 // Max size (both dimensions) for browser and page actions. | 143 // Max size (both dimensions) for browser and page actions. |
| 138 static const int kPageActionIconMaxSize; | 144 static const int kPageActionIconMaxSize; |
| 139 static const int kBrowserActionIconMaxSize; | 145 static const int kBrowserActionIconMaxSize; |
| 140 | 146 |
| 141 // Each permission is a module that the extension is permitted to use. | 147 // Each permission is a module that the extension is permitted to use. |
| 142 // | 148 // |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 705 std::set<std::string> extension_api_permissions; | 711 std::set<std::string> extension_api_permissions; |
| 706 // TODO(akalin): Once we have a unified ExtensionType, replace the | 712 // TODO(akalin): Once we have a unified ExtensionType, replace the |
| 707 // below member variables with a member of that type. | 713 // below member variables with a member of that type. |
| 708 bool is_theme; | 714 bool is_theme; |
| 709 bool is_app; | 715 bool is_app; |
| 710 bool converted_from_user_script; | 716 bool converted_from_user_script; |
| 711 GURL update_url; | 717 GURL update_url; |
| 712 }; | 718 }; |
| 713 | 719 |
| 714 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 720 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |