Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1359)

Unified Diff: components/offline_pages/snapshot_controller.h

Issue 2380093002: [Offline Pages] SnapshotController support for delay after onLoadCompleted and also parameterized c… (Closed)
Patch Set: Fixed a comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/snapshot_controller.h
diff --git a/components/offline_pages/snapshot_controller.h b/components/offline_pages/snapshot_controller.h
index 433ef48f9d73f17fd4277605ae4f996c458efdb6..c3ec36e7ec9ebaa4db12288f9da9302110a76d40 100644
--- a/components/offline_pages/snapshot_controller.h
+++ b/components/offline_pages/snapshot_controller.h
@@ -48,6 +48,11 @@ class SnapshotController {
SnapshotController(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
SnapshotController::Client* client);
+ SnapshotController(
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
+ SnapshotController::Client* client,
+ size_t delay_after_document_available_ms,
+ size_t delay_after_document_on_load_completed_ms);
virtual ~SnapshotController();
// Resets the 'session', returning controller to initial state.
@@ -69,14 +74,18 @@ class SnapshotController {
void DocumentOnLoadCompletedInMainFrame();
size_t GetDelayAfterDocumentAvailableForTest();
+ size_t GetDelayAfterDocumentOnLoadCompletedForTest();
private:
void MaybeStartSnapshot();
+ void MaybeStartSnapshotThenStop();
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
// Client owns this class.
SnapshotController::Client* client_;
SnapshotController::State state_;
+ size_t delay_after_document_available_ms_;
+ size_t delay_after_document_on_load_completed_ms_;
base::WeakPtrFactory<SnapshotController> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/android/offline_pages/recent_tab_helper_unittest.cc ('k') | components/offline_pages/snapshot_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698