Chromium Code Reviews| Index: content/public/browser/mhtml_extra_data.h |
| diff --git a/content/public/browser/mhtml_extra_data.h b/content/public/browser/mhtml_extra_data.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0fe0e0920b4155e477ad80fcf26522c449b39e06 |
| --- /dev/null |
| +++ b/content/public/browser/mhtml_extra_data.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_DATA_H_ |
| +#define CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_DATA_H_ |
| + |
| +#include "base/supports_user_data.h" |
| +#include "content/public/browser/web_contents.h" |
| + |
| +namespace content { |
| + |
| +// Interface class for adding an extra part to MHTML when doing MHTML |
| +// generation. To use it, get it from the web contents with FromWebContents, |
| +// then call StashMHTMLPartForAdditionToPage to add a new part. |
|
fgorski
2017/03/28 17:01:12
please rename
Pete Williamson
2017/03/28 18:01:58
Done.
|
| +class CONTENT_EXPORT MHTMLExtraData : public base::SupportsUserData::Data { |
| + public: |
| + // Retrieves the extra data from the web contents. |
| + static MHTMLExtraData* FromWebContents(WebContents* contents); |
| + |
| + // Construct and save an extra MHTML part which will be added to the MHTML |
|
fgorski
2017/03/28 17:01:12
I believe this had better documentation in impleme
Pete Williamson
2017/03/28 18:01:58
Moved comments from the interface to here.
|
| + // when we generate the page with MHTMLGenerationManager::SaveMHTML(). |
| + virtual void StashMHTMLPartForAdditionToPage( |
|
fgorski
2017/03/28 17:01:12
please rename
Pete Williamson
2017/03/28 18:01:58
Done.
|
| + const std::string& content_type, |
| + const std::string& content_location, |
| + const std::string& body) = 0; |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_MHTML_EXTRA_DATA_H_ |