OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_BROWSER_APPCACHE_APPCACHE_INTERNALS_UI_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_INTERNALS_UI_H_ |
6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_INTERNALS_UI_H_ | 6 #define CONTENT_BROWSER_APPCACHE_APPCACHE_INTERNALS_UI_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
| 11 #include <memory> |
11 | 12 |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "content/browser/appcache/appcache_group.h" | 15 #include "content/browser/appcache/appcache_group.h" |
16 #include "content/browser/appcache/appcache_storage.h" | 16 #include "content/browser/appcache/appcache_storage.h" |
17 #include "content/browser/appcache/chrome_appcache_service.h" | 17 #include "content/browser/appcache/chrome_appcache_service.h" |
18 #include "content/public/browser/storage_partition.h" | 18 #include "content/public/browser/storage_partition.h" |
19 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
20 #include "content/public/browser/web_ui_controller.h" | 20 #include "content/public/browser/web_ui_controller.h" |
21 #include "net/base/io_buffer.h" | 21 #include "net/base/io_buffer.h" |
22 | 22 |
23 namespace base { | 23 namespace base { |
24 class ListValue; | 24 class ListValue; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 int net_result_code); | 64 int net_result_code); |
65 void OnAppCacheInfoDeleted(const std::string& manifest_url, | 65 void OnAppCacheInfoDeleted(const std::string& manifest_url, |
66 int net_result_code); | 66 int net_result_code); |
67 void OnGroupLoaded(AppCacheGroup* appcache_group, | 67 void OnGroupLoaded(AppCacheGroup* appcache_group, |
68 const GURL& manifest_gurl) override; | 68 const GURL& manifest_gurl) override; |
69 void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, | 69 void OnResponseInfoLoaded(AppCacheResponseInfo* response_info, |
70 int64_t response_id) override; | 70 int64_t response_id) override; |
71 void OnResponseDataReadComplete( | 71 void OnResponseDataReadComplete( |
72 const ResponseEnquiry& response_enquiry, | 72 const ResponseEnquiry& response_enquiry, |
73 scoped_refptr<AppCacheResponseInfo> response_info, | 73 scoped_refptr<AppCacheResponseInfo> response_info, |
74 scoped_ptr<AppCacheResponseReader> reader, | 74 std::unique_ptr<AppCacheResponseReader> reader, |
75 scoped_refptr<net::IOBuffer> response_data, | 75 scoped_refptr<net::IOBuffer> response_data, |
76 int net_result_code); | 76 int net_result_code); |
77 void Initialize( | 77 void Initialize( |
78 const scoped_refptr<ChromeAppCacheService>& chrome_appcache_service); | 78 const scoped_refptr<ChromeAppCacheService>& chrome_appcache_service); |
79 void Shutdown(); | 79 void Shutdown(); |
80 | 80 |
81 base::WeakPtr<AppCacheInternalsUI> appcache_internals_ui_; | 81 base::WeakPtr<AppCacheInternalsUI> appcache_internals_ui_; |
82 base::WeakPtr<AppCacheServiceImpl> appcache_service_; | 82 base::WeakPtr<AppCacheServiceImpl> appcache_service_; |
83 AppCacheStorage* appcache_storage_; | 83 AppCacheStorage* appcache_storage_; |
84 base::FilePath partition_path_; | 84 base::FilePath partition_path_; |
(...skipping 17 matching lines...) Expand all Loading... |
102 | 102 |
103 // Results from commands to be sent to Javascript. | 103 // Results from commands to be sent to Javascript. |
104 void OnAllAppCacheInfoReady(scoped_refptr<AppCacheInfoCollection> collection, | 104 void OnAllAppCacheInfoReady(scoped_refptr<AppCacheInfoCollection> collection, |
105 const base::FilePath& partition_path); | 105 const base::FilePath& partition_path); |
106 void OnAppCacheInfoDeleted(const base::FilePath& partition_path, | 106 void OnAppCacheInfoDeleted(const base::FilePath& partition_path, |
107 const std::string& manifest_url, | 107 const std::string& manifest_url, |
108 bool deleted); | 108 bool deleted); |
109 void OnAppCacheDetailsReady( | 109 void OnAppCacheDetailsReady( |
110 const base::FilePath& partition_path, | 110 const base::FilePath& partition_path, |
111 const std::string& manifest_url, | 111 const std::string& manifest_url, |
112 scoped_ptr<AppCacheResourceInfoVector> resource_info_vector); | 112 std::unique_ptr<AppCacheResourceInfoVector> resource_info_vector); |
113 void OnFileDetailsReady(const Proxy::ResponseEnquiry& response_enquiry, | 113 void OnFileDetailsReady(const Proxy::ResponseEnquiry& response_enquiry, |
114 scoped_refptr<AppCacheResponseInfo> response_info, | 114 scoped_refptr<AppCacheResponseInfo> response_info, |
115 scoped_refptr<net::IOBuffer> response_data, | 115 scoped_refptr<net::IOBuffer> response_data, |
116 int data_length); | 116 int data_length); |
117 void OnFileDetailsFailed(const Proxy::ResponseEnquiry& response_enquiry, | 117 void OnFileDetailsFailed(const Proxy::ResponseEnquiry& response_enquiry, |
118 int data_length); | 118 int data_length); |
119 | 119 |
120 BrowserContext* browser_context() { | 120 BrowserContext* browser_context() { |
121 return web_ui()->GetWebContents()->GetBrowserContext(); | 121 return web_ui()->GetWebContents()->GetBrowserContext(); |
122 } | 122 } |
123 | 123 |
124 Proxy* GetProxyForPartitionPath(const base::FilePath& path); | 124 Proxy* GetProxyForPartitionPath(const base::FilePath& path); |
125 std::list<scoped_refptr<Proxy>> appcache_proxies_; | 125 std::list<scoped_refptr<Proxy>> appcache_proxies_; |
126 base::WeakPtrFactory<AppCacheInternalsUI> weak_ptr_factory_; | 126 base::WeakPtrFactory<AppCacheInternalsUI> weak_ptr_factory_; |
127 | 127 |
128 DISALLOW_COPY_AND_ASSIGN(AppCacheInternalsUI); | 128 DISALLOW_COPY_AND_ASSIGN(AppCacheInternalsUI); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace content | 131 } // namespace content |
132 #endif | 132 #endif |
OLD | NEW |