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_PRERENDERING_OFFLINER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ |
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Callback logic for PrerenderingLoader::LoadPage(). | 65 // Callback logic for PrerenderingLoader::LoadPage(). |
66 void OnLoadPageDone(const SavePageRequest& request, | 66 void OnLoadPageDone(const SavePageRequest& request, |
67 Offliner::RequestStatus load_status, | 67 Offliner::RequestStatus load_status, |
68 content::WebContents* web_contents); | 68 content::WebContents* web_contents); |
69 | 69 |
70 // Callback logic for OfflinePageModel::SavePage(). | 70 // Callback logic for OfflinePageModel::SavePage(). |
71 void OnSavePageDone(const SavePageRequest& request, | 71 void OnSavePageDone(const SavePageRequest& request, |
72 SavePageResult save_result, | 72 SavePageResult save_result, |
73 int64_t offline_id); | 73 int64_t offline_id); |
74 | 74 |
| 75 // Write the payload of the loading signal data MHTML section into a string. |
| 76 std::string SerializeLoadingSignalData(); |
| 77 |
75 PrerenderingLoader* GetOrCreateLoader(); | 78 PrerenderingLoader* GetOrCreateLoader(); |
76 | 79 |
77 // Listener function for changes to application background/foreground state. | 80 // Listener function for changes to application background/foreground state. |
78 void OnApplicationStateChange( | 81 void OnApplicationStateChange( |
79 base::android::ApplicationState application_state); | 82 base::android::ApplicationState application_state); |
80 void HandleApplicationStateChangeCancel(const SavePageRequest& request, | 83 void HandleApplicationStateChangeCancel(const SavePageRequest& request, |
81 int64_t offline_id); | 84 int64_t offline_id); |
82 | 85 |
83 // Not owned. | 86 // Not owned. |
84 content::BrowserContext* browser_context_; | 87 content::BrowserContext* browser_context_; |
(...skipping 14 matching lines...) Expand all Loading... |
99 // ApplicationStatusListener to monitor if the Chrome moves to the foreground. | 102 // ApplicationStatusListener to monitor if the Chrome moves to the foreground. |
100 std::unique_ptr<base::android::ApplicationStatusListener> app_listener_; | 103 std::unique_ptr<base::android::ApplicationStatusListener> app_listener_; |
101 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_; | 104 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_; |
102 | 105 |
103 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner); | 106 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner); |
104 }; | 107 }; |
105 | 108 |
106 } // namespace offline_pages | 109 } // namespace offline_pages |
107 | 110 |
108 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ | 111 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ |
OLD | NEW |