OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ |
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ | 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/android/application_status_listener.h" | 10 #include "base/android/application_status_listener.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 class BackgroundLoaderOffliner : public Offliner, | 29 class BackgroundLoaderOffliner : public Offliner, |
30 public content::WebContentsObserver { | 30 public content::WebContentsObserver { |
31 public: | 31 public: |
32 BackgroundLoaderOffliner(content::BrowserContext* browser_context, | 32 BackgroundLoaderOffliner(content::BrowserContext* browser_context, |
33 const OfflinerPolicy* policy, | 33 const OfflinerPolicy* policy, |
34 OfflinePageModel* offline_page_model); | 34 OfflinePageModel* offline_page_model); |
35 ~BackgroundLoaderOffliner() override; | 35 ~BackgroundLoaderOffliner() override; |
36 | 36 |
37 // Offliner implementation. | 37 // Offliner implementation. |
38 bool LoadAndSave(const SavePageRequest& request, | 38 bool LoadAndSave(const SavePageRequest& request, |
39 const CompletionCallback& callback) override; | 39 const CompletionCallback& completion_callback, |
| 40 const ProgressCallback& progress_callback) override; |
40 void Cancel() override; | 41 void Cancel() override; |
41 bool HandleTimeout(const SavePageRequest& request) override; | 42 bool HandleTimeout(const SavePageRequest& request) override; |
42 | 43 |
43 // WebContentsObserver implementation. | 44 // WebContentsObserver implementation. |
44 void DidStopLoading() override; | 45 void DidStopLoading() override; |
45 void RenderProcessGone(base::TerminationStatus status) override; | 46 void RenderProcessGone(base::TerminationStatus status) override; |
46 void WebContentsDestroyed() override; | 47 void WebContentsDestroyed() override; |
47 void DidFinishNavigation( | 48 void DidFinishNavigation( |
48 content::NavigationHandle* navigation_handle) override; | 49 content::NavigationHandle* navigation_handle) override; |
49 | 50 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 PageLoadState page_load_state_; | 89 PageLoadState page_load_state_; |
89 // Seconds to delay before taking snapshot. | 90 // Seconds to delay before taking snapshot. |
90 long page_delay_ms_; | 91 long page_delay_ms_; |
91 | 92 |
92 base::WeakPtrFactory<BackgroundLoaderOffliner> weak_ptr_factory_; | 93 base::WeakPtrFactory<BackgroundLoaderOffliner> weak_ptr_factory_; |
93 DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderOffliner); | 94 DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderOffliner); |
94 }; | 95 }; |
95 | 96 |
96 } // namespace offline_pages | 97 } // namespace offline_pages |
97 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ | 98 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ |
OLD | NEW |