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_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 | 27 |
28 // Returns the URL leading to a search page for Web Intents. The search is | 28 // Returns the URL leading to a search page for Web Intents. The search is |
29 // specific to intents with the given |action| and |type|. | 29 // specific to intents with the given |action| and |type|. |
30 GURL GetWebstoreIntentQueryURL(const std::string& action, | 30 GURL GetWebstoreIntentQueryURL(const std::string& action, |
31 const std::string& type); | 31 const std::string& type); |
32 | 32 |
33 // Returns the URL used to get webstore data (ratings, manifest, icon URL, | 33 // Returns the URL used to get webstore data (ratings, manifest, icon URL, |
34 // etc.) about an extension from the webstore as JSON. | 34 // etc.) about an extension from the webstore as JSON. |
35 GURL GetWebstoreItemJsonDataURL(const std::string& extension_id); | 35 GURL GetWebstoreItemJsonDataURL(const std::string& extension_id); |
36 | 36 |
| 37 // Returns the URL used to get webstore search results in JSON format. The URL |
| 38 // returns a JSON dictionary that has the search results (under "results"). |
| 39 // Each entry in the array is a dictionary as the data returned for |
| 40 // GetWebstoreItemJsonDataURL above. |query| is the user typed query string. |
| 41 // |hl| is the host language code, e.g. en_US. Both arguments will be escaped |
| 42 // and added as a query parameter to the returned web store json search URL. |
| 43 GURL GetWebstoreJsonSearchUrl(const std::string& query, |
| 44 const std::string& hl); |
| 45 |
| 46 // Returns the URL of the web store search results page for |query|. |
| 47 GURL GetWebstoreSearchPageUrl(const std::string& query); |
| 48 |
37 // Return the update URL used by gallery/webstore extensions/apps. | 49 // Return the update URL used by gallery/webstore extensions/apps. |
38 GURL GetWebstoreUpdateUrl(); | 50 GURL GetWebstoreUpdateUrl(); |
39 | 51 |
40 // Returns whether the URL is the webstore update URL (just considering host | 52 // Returns whether the URL is the webstore update URL (just considering host |
41 // and path, not scheme, query, etc.) | 53 // and path, not scheme, query, etc.) |
42 bool IsWebstoreUpdateUrl(const GURL& update_url); | 54 bool IsWebstoreUpdateUrl(const GURL& update_url); |
43 | 55 |
44 // Returns true if the URL points to an extension blacklist. | 56 // Returns true if the URL points to an extension blacklist. |
45 bool IsBlacklistUpdateUrl(const GURL& url); | 57 bool IsBlacklistUpdateUrl(const GURL& url); |
46 | 58 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 // List of sizes for extension icons that can be defined in the manifest. | 334 // List of sizes for extension icons that can be defined in the manifest. |
323 extern const int kExtensionActionIconSizes[]; | 335 extern const int kExtensionActionIconSizes[]; |
324 extern const size_t kNumExtensionActionIconSizes; | 336 extern const size_t kNumExtensionActionIconSizes; |
325 | 337 |
326 // List of sizes for extension icons that can be defined in the manifest. | 338 // List of sizes for extension icons that can be defined in the manifest. |
327 extern const int kScriptBadgeIconSizes[]; | 339 extern const int kScriptBadgeIconSizes[]; |
328 extern const size_t kNumScriptBadgeIconSizes; | 340 extern const size_t kNumScriptBadgeIconSizes; |
329 } // namespace extension_misc | 341 } // namespace extension_misc |
330 | 342 |
331 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ | 343 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |
OLD | NEW |