OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 | 533 |
534 // Saves the given frame's URL to the local filesystem. The headers, if | 534 // Saves the given frame's URL to the local filesystem. The headers, if |
535 // provided, is used to make a request to the URL rather than using cache. | 535 // provided, is used to make a request to the URL rather than using cache. |
536 // Format of |headers| is a new line separated list of key value pairs: | 536 // Format of |headers| is a new line separated list of key value pairs: |
537 // "<key1>: <value1>\n<key2>: <value2>". | 537 // "<key1>: <value1>\n<key2>: <value2>". |
538 virtual void SaveFrameWithHeaders(const GURL& url, | 538 virtual void SaveFrameWithHeaders(const GURL& url, |
539 const Referrer& referrer, | 539 const Referrer& referrer, |
540 const std::string& headers) = 0; | 540 const std::string& headers) = 0; |
541 | 541 |
542 // Generate an MHTML representation of the current page in the given file. | 542 // Generate an MHTML representation of the current page in the given file. |
543 // If |use_binary_encoding| is specified, a Content-Transfer-Encoding value of | |
544 // 'binary' will be used, instead of a combination of 'quoted-printable' and | |
545 // 'base64'. Binary encoding is known to have interoperability issues and so | |
nasko
2016/04/20 22:22:38
nit: s/so//
| |
546 // is not the recommended encoding for shareable content. | |
543 virtual void GenerateMHTML( | 547 virtual void GenerateMHTML( |
544 const base::FilePath& file, | 548 const base::FilePath& file, |
549 bool use_binary_encoding, | |
545 const base::Callback<void(int64_t /* size of the file */)>& callback) = 0; | 550 const base::Callback<void(int64_t /* size of the file */)>& callback) = 0; |
546 | 551 |
547 // Returns the contents MIME type after a navigation. | 552 // Returns the contents MIME type after a navigation. |
548 virtual const std::string& GetContentsMimeType() const = 0; | 553 virtual const std::string& GetContentsMimeType() const = 0; |
549 | 554 |
550 // Returns true if this WebContents will notify about disconnection. | 555 // Returns true if this WebContents will notify about disconnection. |
551 virtual bool WillNotifyDisconnection() const = 0; | 556 virtual bool WillNotifyDisconnection() const = 0; |
552 | 557 |
553 // Override the encoding and reload the page by sending down | 558 // Override the encoding and reload the page by sending down |
554 // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda | 559 // ViewMsg_SetPageEncoding to the renderer. |UpdateEncoding| is kinda |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
733 | 738 |
734 private: | 739 private: |
735 // This interface should only be implemented inside content. | 740 // This interface should only be implemented inside content. |
736 friend class WebContentsImpl; | 741 friend class WebContentsImpl; |
737 WebContents() {} | 742 WebContents() {} |
738 }; | 743 }; |
739 | 744 |
740 } // namespace content | 745 } // namespace content |
741 | 746 |
742 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 747 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |