| 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 WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ | 5 #ifndef WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ |
| 6 #define WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ | 6 #define WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 bool is_explicit; | 93 bool is_explicit; |
| 94 int64 response_id; | 94 int64 response_id; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 typedef std::vector<AppCacheResourceInfo> AppCacheResourceInfoVector; | 97 typedef std::vector<AppCacheResourceInfo> AppCacheResourceInfoVector; |
| 98 | 98 |
| 99 struct WEBKIT_STORAGE_EXPORT Namespace { | 99 struct WEBKIT_STORAGE_EXPORT Namespace { |
| 100 Namespace(); // Type is set to FALLBACK_NAMESPACE by default. | 100 Namespace(); // Type is set to FALLBACK_NAMESPACE by default. |
| 101 Namespace(NamespaceType type, const GURL& url, const GURL& target, | 101 Namespace(NamespaceType type, const GURL& url, const GURL& target, |
| 102 bool is_pattern); | 102 bool is_pattern); |
| 103 Namespace(NamespaceType type, const GURL& url, const GURL& target, |
| 104 bool is_pattern, bool is_executable); |
| 103 ~Namespace(); | 105 ~Namespace(); |
| 104 | 106 |
| 105 bool IsMatch(const GURL& url) const; | 107 bool IsMatch(const GURL& url) const; |
| 106 | 108 |
| 107 NamespaceType type; | 109 NamespaceType type; |
| 108 GURL namespace_url; | 110 GURL namespace_url; |
| 109 GURL target_url; | 111 GURL target_url; |
| 110 bool is_pattern; | 112 bool is_pattern; |
| 113 bool is_executable; |
| 111 }; | 114 }; |
| 112 | 115 |
| 113 typedef std::vector<Namespace> NamespaceVector; | 116 typedef std::vector<Namespace> NamespaceVector; |
| 114 | 117 |
| 115 // Interface used by backend (browser-process) to talk to frontend (renderer). | 118 // Interface used by backend (browser-process) to talk to frontend (renderer). |
| 116 class WEBKIT_STORAGE_EXPORT AppCacheFrontend { | 119 class WEBKIT_STORAGE_EXPORT AppCacheFrontend { |
| 117 public: | 120 public: |
| 118 virtual void OnCacheSelected( | 121 virtual void OnCacheSelected( |
| 119 int host_id, const appcache::AppCacheInfo& info) = 0; | 122 int host_id, const appcache::AppCacheInfo& info) = 0; |
| 120 virtual void OnStatusChanged(const std::vector<int>& host_ids, | 123 virtual void OnStatusChanged(const std::vector<int>& host_ids, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 167 |
| 165 // Useful string constants. | 168 // Useful string constants. |
| 166 // Note: These are also defined elsewhere in the chrome code base in | 169 // Note: These are also defined elsewhere in the chrome code base in |
| 167 // url_contants.h .cc, however the appcache library doesn't not have | 170 // url_contants.h .cc, however the appcache library doesn't not have |
| 168 // any dependencies on the chrome library, so we can't use them in here. | 171 // any dependencies on the chrome library, so we can't use them in here. |
| 169 extern const char kHttpScheme[]; | 172 extern const char kHttpScheme[]; |
| 170 extern const char kHttpsScheme[]; | 173 extern const char kHttpsScheme[]; |
| 171 extern const char kHttpGETMethod[]; | 174 extern const char kHttpGETMethod[]; |
| 172 extern const char kHttpHEADMethod[]; | 175 extern const char kHttpHEADMethod[]; |
| 173 | 176 |
| 177 // CommandLine flag to turn this experimental feature on. |
| 178 extern const char kEnableExecutableHandlers[]; |
| 179 |
| 174 WEBKIT_STORAGE_EXPORT void AddSupportedScheme(const char* scheme); | 180 WEBKIT_STORAGE_EXPORT void AddSupportedScheme(const char* scheme); |
| 175 | 181 |
| 176 bool IsSchemeSupported(const GURL& url); | 182 bool IsSchemeSupported(const GURL& url); |
| 177 bool IsMethodSupported(const std::string& method); | 183 bool IsMethodSupported(const std::string& method); |
| 178 bool IsSchemeAndMethodSupported(const net::URLRequest* request); | 184 bool IsSchemeAndMethodSupported(const net::URLRequest* request); |
| 179 | 185 |
| 180 WEBKIT_STORAGE_EXPORT extern const base::FilePath::CharType | 186 WEBKIT_STORAGE_EXPORT extern const base::FilePath::CharType |
| 181 kAppCacheDatabaseName[]; | 187 kAppCacheDatabaseName[]; |
| 182 | 188 |
| 183 } // namespace | 189 } // namespace |
| 184 | 190 |
| 185 #endif // WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ | 191 #endif // WEBKIT_APPCACHE_APPCACHE_INTERFACES_H_ |
| OLD | NEW |