OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_INDEXED_DB_INDEXED_DB_INTERNALS_UI_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INTERNALS_UI_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INTERNALS_UI_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INTERNALS_UI_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "content/public/browser/indexed_db_context.h" | 12 #include "content/public/browser/indexed_db_context.h" |
13 #include "content/public/browser/web_ui_controller.h" | 13 #include "content/public/browser/web_ui_controller.h" |
| 14 #include "net/base/net_errors.h" |
14 | 15 |
15 namespace base { class ListValue; } | 16 namespace base { class ListValue; } |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 | 19 |
| 20 class DownloadItem; |
| 21 class IndexedDBContextImpl; |
19 class StoragePartition; | 22 class StoragePartition; |
20 | 23 |
21 // The implementation for the chrome://indexeddb-internals page. | 24 // The implementation for the chrome://indexeddb-internals page. |
22 class IndexedDBInternalsUI : public WebUIController { | 25 class IndexedDBInternalsUI : public WebUIController { |
23 public: | 26 public: |
24 explicit IndexedDBInternalsUI(WebUI* web_ui); | 27 explicit IndexedDBInternalsUI(WebUI* web_ui); |
25 virtual ~IndexedDBInternalsUI(); | 28 virtual ~IndexedDBInternalsUI(); |
26 | 29 |
27 private: | 30 private: |
28 typedef std::vector<scoped_refptr<IndexedDBContext> > ContextList; | 31 typedef std::vector<scoped_refptr<IndexedDBContext> > ContextList; |
29 void GetAllOrigins(const base::ListValue* args); | 32 void GetAllOrigins(const base::ListValue* args); |
30 void GetAllOriginsOnWebkitThread( | 33 void GetAllOriginsOnWebkitThread( |
31 scoped_ptr<ContextList> contexts, | 34 const scoped_ptr<ContextList> contexts, |
32 scoped_ptr<std::vector<base::FilePath> > context_paths); | 35 const scoped_ptr<std::vector<base::FilePath> > context_paths); |
33 void OnOriginsReady(scoped_ptr<std::vector<IndexedDBInfo> > origins, | 36 void OnOriginsReady(scoped_ptr<std::vector<IndexedDBInfo> > origins, |
34 const base::FilePath& path); | 37 const base::FilePath& path); |
35 | 38 |
36 static void AddContextFromStoragePartition(ContextList* contexts, | 39 static void AddContextFromStoragePartition(ContextList* contexts, |
37 std::vector<base::FilePath>* paths, | 40 std::vector<base::FilePath>* paths, |
38 StoragePartition* partition); | 41 StoragePartition* partition); |
39 | 42 |
| 43 void DownloadOriginData(const base::ListValue* args); |
| 44 void DownloadOriginDataOnWebkitThread( |
| 45 const base::FilePath& partition_path, |
| 46 const scoped_refptr<IndexedDBContextImpl> context, |
| 47 const GURL& origin_url); |
| 48 void OnDownloadDataReady(const base::FilePath& partition_path, |
| 49 const GURL& origin_url, |
| 50 const base::FilePath temp_path, |
| 51 const base::FilePath zip_path); |
| 52 void OnDownloadStarted(const base::FilePath& partition_path, |
| 53 const GURL& origin_url, |
| 54 const base::FilePath& temp_path, |
| 55 content::DownloadItem* item, |
| 56 net::Error error); |
| 57 |
40 DISALLOW_COPY_AND_ASSIGN(IndexedDBInternalsUI); | 58 DISALLOW_COPY_AND_ASSIGN(IndexedDBInternalsUI); |
41 }; | 59 }; |
42 | 60 |
43 } // namespace content | 61 } // namespace content |
44 | 62 |
45 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INTERNALS_UI_H_ | 63 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_INTERNALS_UI_H_ |
OLD | NEW |