| 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
| 6 | 6 |
| 7 #include "base/mac/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
| 8 #include "chrome/browser/browsing_data/browsing_data_cache_storage_helper.h" |
| 8 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_database_helper.h" |
| 9 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" | 10 #include "chrome/browser/browsing_data/browsing_data_indexed_db_helper.h" |
| 10 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" | 11 #include "chrome/browser/browsing_data/browsing_data_local_storage_helper.h" |
| 11 #include "chrome/browser/browsing_data/browsing_data_service_worker_helper.h" | 12 #include "chrome/browser/browsing_data/browsing_data_service_worker_helper.h" |
| 12 #include "content/public/browser/appcache_service.h" | 13 #include "content/public/browser/appcache_service.h" |
| 13 | 14 |
| 14 class CookieTreeNode; | 15 class CookieTreeNode; |
| 15 | 16 |
| 16 namespace net { | 17 namespace net { |
| 17 class CanonicalCookie; | 18 class CanonicalCookie; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 40 kCocoaCookieDetailsTypeTreeAppCache, | 41 kCocoaCookieDetailsTypeTreeAppCache, |
| 41 | 42 |
| 42 // Detailed information about an IndexedDB used for display in the | 43 // Detailed information about an IndexedDB used for display in the |
| 43 // cookie tree. | 44 // cookie tree. |
| 44 kCocoaCookieDetailsTypeTreeIndexedDB, | 45 kCocoaCookieDetailsTypeTreeIndexedDB, |
| 45 | 46 |
| 46 // Detailed information about a Service Worker used for display in the | 47 // Detailed information about a Service Worker used for display in the |
| 47 // cookie tree. | 48 // cookie tree. |
| 48 kCocoaCookieDetailsTypeTreeServiceWorker, | 49 kCocoaCookieDetailsTypeTreeServiceWorker, |
| 49 | 50 |
| 51 // Detailed information about Cache Storage used for display in the |
| 52 // cookie tree. |
| 53 kCocoaCookieDetailsTypeTreeCacheStorage, |
| 54 |
| 50 // Detailed information about a web database used for display | 55 // Detailed information about a web database used for display |
| 51 // in the cookie prompt dialog. | 56 // in the cookie prompt dialog. |
| 52 kCocoaCookieDetailsTypePromptDatabase, | 57 kCocoaCookieDetailsTypePromptDatabase, |
| 53 | 58 |
| 54 // Detailed information about local storage used for display | 59 // Detailed information about local storage used for display |
| 55 // in the cookie prompt dialog. | 60 // in the cookie prompt dialog. |
| 56 kCocoaCookieDetailsTypePromptLocalStorage, | 61 kCocoaCookieDetailsTypePromptLocalStorage, |
| 57 | 62 |
| 58 // Detailed information about app caches used for display | 63 // Detailed information about app caches used for display |
| 59 // in the cookie prompt dialog. | 64 // in the cookie prompt dialog. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 base::scoped_nsobject<NSString> created_; | 96 base::scoped_nsobject<NSString> created_; |
| 92 | 97 |
| 93 // Only set for types kCocoaCookieDetailsTypeCookie, and | 98 // Only set for types kCocoaCookieDetailsTypeCookie, and |
| 94 // kCocoaCookieDetailsTypePromptDatabase nodes. | 99 // kCocoaCookieDetailsTypePromptDatabase nodes. |
| 95 base::scoped_nsobject<NSString> name_; | 100 base::scoped_nsobject<NSString> name_; |
| 96 | 101 |
| 97 // Only set for type kCocoaCookieDetailsTypeTreeLocalStorage, | 102 // Only set for type kCocoaCookieDetailsTypeTreeLocalStorage, |
| 98 // kCocoaCookieDetailsTypeTreeDatabase, | 103 // kCocoaCookieDetailsTypeTreeDatabase, |
| 99 // kCocoaCookieDetailsTypePromptDatabase, | 104 // kCocoaCookieDetailsTypePromptDatabase, |
| 100 // kCocoaCookieDetailsTypeTreeIndexedDB, | 105 // kCocoaCookieDetailsTypeTreeIndexedDB, |
| 101 // kCocoaCookieDetailsTypeTreeServiceWorker, and | 106 // kCocoaCookieDetailsTypeTreeServiceWorker, |
| 107 // kCocoaCookieDetailsTypeTreeCacheStorage, and |
| 102 // kCocoaCookieDetailsTypeTreeAppCache nodes. | 108 // kCocoaCookieDetailsTypeTreeAppCache nodes. |
| 103 base::scoped_nsobject<NSString> fileSize_; | 109 base::scoped_nsobject<NSString> fileSize_; |
| 104 | 110 |
| 105 // Only set for types kCocoaCookieDetailsTypeTreeLocalStorage, | 111 // Only set for types kCocoaCookieDetailsTypeTreeLocalStorage, |
| 106 // kCocoaCookieDetailsTypeTreeDatabase, | 112 // kCocoaCookieDetailsTypeTreeDatabase, |
| 107 // kCocoaCookieDetailsTypeTreeServiceWorker, and | 113 // kCocoaCookieDetailsTypeTreeServiceWorker, |
| 114 // kCocoaCookieDetailsTypeTreeCacheStorage, and |
| 108 // kCocoaCookieDetailsTypeTreeIndexedDB nodes. | 115 // kCocoaCookieDetailsTypeTreeIndexedDB nodes. |
| 109 base::scoped_nsobject<NSString> lastModified_; | 116 base::scoped_nsobject<NSString> lastModified_; |
| 110 | 117 |
| 111 // Only set for type kCocoaCookieDetailsTypeTreeAppCache nodes. | 118 // Only set for type kCocoaCookieDetailsTypeTreeAppCache nodes. |
| 112 base::scoped_nsobject<NSString> lastAccessed_; | 119 base::scoped_nsobject<NSString> lastAccessed_; |
| 113 | 120 |
| 114 // Only set for type kCocoaCookieDetailsTypeCookie, | 121 // Only set for type kCocoaCookieDetailsTypeCookie, |
| 115 // kCocoaCookieDetailsTypePromptDatabase, | 122 // kCocoaCookieDetailsTypePromptDatabase, |
| 116 // kCocoaCookieDetailsTypePromptLocalStorage, | 123 // kCocoaCookieDetailsTypePromptLocalStorage, |
| 117 // kCocoaCookieDetailsTypePromptServiceWorker, and | 124 // kCocoaCookieDetailsTypePromptServiceWorker, |
| 125 // kCocoaCookieDetailsTypePromptCacheStorage, and |
| 118 // kCocoaCookieDetailsTypeTreeIndexedDB nodes. | 126 // kCocoaCookieDetailsTypeTreeIndexedDB nodes. |
| 119 base::scoped_nsobject<NSString> domain_; | 127 base::scoped_nsobject<NSString> domain_; |
| 120 | 128 |
| 121 // Only set for type kCocoaCookieTreeNodeTypeDatabaseStorage and | 129 // Only set for type kCocoaCookieTreeNodeTypeDatabaseStorage and |
| 122 // kCocoaCookieDetailsTypePromptDatabase nodes. | 130 // kCocoaCookieDetailsTypePromptDatabase nodes. |
| 123 base::scoped_nsobject<NSString> databaseDescription_; | 131 base::scoped_nsobject<NSString> databaseDescription_; |
| 124 | 132 |
| 125 // Only set for type kCocoaCookieDetailsTypePromptLocalStorage. | 133 // Only set for type kCocoaCookieDetailsTypePromptLocalStorage. |
| 126 base::scoped_nsobject<NSString> localStorageKey_; | 134 base::scoped_nsobject<NSString> localStorageKey_; |
| 127 base::scoped_nsobject<NSString> localStorageValue_; | 135 base::scoped_nsobject<NSString> localStorageValue_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 149 // hidden value is |true|. | 157 // hidden value is |true|. |
| 150 - (BOOL)shouldHideCookieDetailsView; | 158 - (BOOL)shouldHideCookieDetailsView; |
| 151 - (BOOL)shouldShowLocalStorageTreeDetailsView; | 159 - (BOOL)shouldShowLocalStorageTreeDetailsView; |
| 152 - (BOOL)shouldShowLocalStoragePromptDetailsView; | 160 - (BOOL)shouldShowLocalStoragePromptDetailsView; |
| 153 - (BOOL)shouldShowDatabaseTreeDetailsView; | 161 - (BOOL)shouldShowDatabaseTreeDetailsView; |
| 154 - (BOOL)shouldShowDatabasePromptDetailsView; | 162 - (BOOL)shouldShowDatabasePromptDetailsView; |
| 155 - (BOOL)shouldShowAppCachePromptDetailsView; | 163 - (BOOL)shouldShowAppCachePromptDetailsView; |
| 156 - (BOOL)shouldShowAppCacheTreeDetailsView; | 164 - (BOOL)shouldShowAppCacheTreeDetailsView; |
| 157 - (BOOL)shouldShowIndexedDBTreeDetailsView; | 165 - (BOOL)shouldShowIndexedDBTreeDetailsView; |
| 158 - (BOOL)shouldShowServiceWorkerTreeDetailsView; | 166 - (BOOL)shouldShowServiceWorkerTreeDetailsView; |
| 167 - (BOOL)shouldShowCacheStorageTreeDetailsView; |
| 159 | 168 |
| 160 - (NSString*)name; | 169 - (NSString*)name; |
| 161 - (NSString*)content; | 170 - (NSString*)content; |
| 162 - (NSString*)domain; | 171 - (NSString*)domain; |
| 163 - (NSString*)path; | 172 - (NSString*)path; |
| 164 - (NSString*)sendFor; | 173 - (NSString*)sendFor; |
| 165 - (NSString*)created; | 174 - (NSString*)created; |
| 166 - (NSString*)expires; | 175 - (NSString*)expires; |
| 167 - (NSString*)fileSize; | 176 - (NSString*)fileSize; |
| 168 - (NSString*)lastModified; | 177 - (NSString*)lastModified; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 - (id)initWithAppCacheManifestURL:(const std::string&)manifestURL; | 218 - (id)initWithAppCacheManifestURL:(const std::string&)manifestURL; |
| 210 | 219 |
| 211 // Used for IndexedDB details in the cookie tree. | 220 // Used for IndexedDB details in the cookie tree. |
| 212 - (id)initWithIndexedDBInfo: | 221 - (id)initWithIndexedDBInfo: |
| 213 (const content::IndexedDBInfo*)indexedDB; | 222 (const content::IndexedDBInfo*)indexedDB; |
| 214 | 223 |
| 215 // Used for ServiceWorker details in the cookie tree. | 224 // Used for ServiceWorker details in the cookie tree. |
| 216 - (id)initWithServiceWorkerUsageInfo: | 225 - (id)initWithServiceWorkerUsageInfo: |
| 217 (const content::ServiceWorkerUsageInfo*)serviceWorker; | 226 (const content::ServiceWorkerUsageInfo*)serviceWorker; |
| 218 | 227 |
| 228 // Used for CacheStorage details in the cookie tree. |
| 229 - (id)initWithCacheStorageUsageInfo: |
| 230 (const content::CacheStorageUsageInfo*)cacheStorage; |
| 231 |
| 219 // A factory method to create a configured instance given a node from | 232 // A factory method to create a configured instance given a node from |
| 220 // the cookie tree in |treeNode|. | 233 // the cookie tree in |treeNode|. |
| 221 + (CocoaCookieDetails*)createFromCookieTreeNode:(CookieTreeNode*)treeNode; | 234 + (CocoaCookieDetails*)createFromCookieTreeNode:(CookieTreeNode*)treeNode; |
| 222 | 235 |
| 223 @end | 236 @end |
| 224 | 237 |
| 225 // The subpanes of the cookie details view expect to be able to bind to methods | 238 // The subpanes of the cookie details view expect to be able to bind to methods |
| 226 // through a key path in the form |content.details.xxxx|. This class serves as | 239 // through a key path in the form |content.details.xxxx|. This class serves as |
| 227 // an adapter that simply wraps a |CocoaCookieDetails| object. An instance of | 240 // an adapter that simply wraps a |CocoaCookieDetails| object. An instance of |
| 228 // this class is set as the content object for cookie details view's object | 241 // this class is set as the content object for cookie details view's object |
| 229 // controller so that key paths are properly resolved through to the | 242 // controller so that key paths are properly resolved through to the |
| 230 // |CocoaCookieDetails| object for the cookie prompt. | 243 // |CocoaCookieDetails| object for the cookie prompt. |
| 231 @interface CookiePromptContentDetailsAdapter : NSObject { | 244 @interface CookiePromptContentDetailsAdapter : NSObject { |
| 232 @private | 245 @private |
| 233 base::scoped_nsobject<CocoaCookieDetails> details_; | 246 base::scoped_nsobject<CocoaCookieDetails> details_; |
| 234 } | 247 } |
| 235 | 248 |
| 236 - (CocoaCookieDetails*)details; | 249 - (CocoaCookieDetails*)details; |
| 237 | 250 |
| 238 // The adapter assumes ownership of the details object | 251 // The adapter assumes ownership of the details object |
| 239 // in its initializer. | 252 // in its initializer. |
| 240 - (id)initWithDetails:(CocoaCookieDetails*)details; | 253 - (id)initWithDetails:(CocoaCookieDetails*)details; |
| 241 @end | 254 @end |
| OLD | NEW |