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

Side by Side Diff: components/offline_pages/core/offline_page_archiver.h

Issue 2656713002: Merge to M57: Remove popup overlay from MHTML when requested (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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 COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 enum class ArchiverResult { 51 enum class ArchiverResult {
52 SUCCESSFULLY_CREATED, // Archive created successfully. 52 SUCCESSFULLY_CREATED, // Archive created successfully.
53 ERROR_DEVICE_FULL, // Cannot save the archive - device is full. 53 ERROR_DEVICE_FULL, // Cannot save the archive - device is full.
54 ERROR_CANCELED, // Caller canceled the request. 54 ERROR_CANCELED, // Caller canceled the request.
55 ERROR_CONTENT_UNAVAILABLE, // Content to archive is not available. 55 ERROR_CONTENT_UNAVAILABLE, // Content to archive is not available.
56 ERROR_ARCHIVE_CREATION_FAILED, // Creation of archive failed. 56 ERROR_ARCHIVE_CREATION_FAILED, // Creation of archive failed.
57 ERROR_SECURITY_CERTIFICATE, // Page was loaded on secure connection, but 57 ERROR_SECURITY_CERTIFICATE, // Page was loaded on secure connection, but
58 // there was a security error. 58 // there was a security error.
59 }; 59 };
60 60
61 // Describes the parameters to control how to create an archive.
62 struct CreateArchiveParams {
63 CreateArchiveParams() : remove_popup_overlay(false) {}
64
65 // Whether to remove popup overlay that obstructs viewing normal content.
66 bool remove_popup_overlay;
67 };
68
61 typedef base::Callback<void(OfflinePageArchiver* /* archiver */, 69 typedef base::Callback<void(OfflinePageArchiver* /* archiver */,
62 ArchiverResult /* result */, 70 ArchiverResult /* result */,
63 const GURL& /* url */, 71 const GURL& /* url */,
64 const base::FilePath& /* file_path */, 72 const base::FilePath& /* file_path */,
65 const base::string16& /* title */, 73 const base::string16& /* title */,
66 int64_t /* file_size */)> 74 int64_t /* file_size */)>
67 CreateArchiveCallback; 75 CreateArchiveCallback;
68 76
69 virtual ~OfflinePageArchiver() {} 77 virtual ~OfflinePageArchiver() {}
70 78
71 // Starts creating the archive in the |archives_dir| with |archive_id| added 79 // Starts creating the archive in the |archives_dir| per
72 // to the archive filename. Once archive is created |callback| will be called 80 // |create_archive_params|. Once archive is created |callback| will be called
73 // with the result and additional information. 81 // with the result and additional information.
74 virtual void CreateArchive(const base::FilePath& archives_dir, 82 virtual void CreateArchive(const base::FilePath& archives_dir,
75 int64_t archive_id, 83 const CreateArchiveParams& create_archive_params,
76 const CreateArchiveCallback& callback) = 0; 84 const CreateArchiveCallback& callback) = 0;
77 }; 85 };
78 86
79 } // namespace offline_pages 87 } // namespace offline_pages
80 88
81 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_ 89 #endif // COMPONENTS_OFFLINE_PAGES_CORE_OFFLINE_PAGE_ARCHIVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/offline_pages/recent_tab_helper.cc ('k') | components/offline_pages/core/offline_page_client_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698