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 <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 const std::vector<SkBitmap>&, /* bitmaps */ | 577 const std::vector<SkBitmap>&, /* bitmaps */ |
578 /* The sizes in pixel of the bitmaps before they were resized due to the | 578 /* The sizes in pixel of the bitmaps before they were resized due to the |
579 max bitmap size passed to DownloadImage(). Each entry in the bitmaps | 579 max bitmap size passed to DownloadImage(). Each entry in the bitmaps |
580 vector corresponds to an entry in the sizes vector. If a bitmap was | 580 vector corresponds to an entry in the sizes vector. If a bitmap was |
581 resized, there should be a single returned bitmap. */ | 581 resized, there should be a single returned bitmap. */ |
582 const std::vector<gfx::Size>&)> | 582 const std::vector<gfx::Size>&)> |
583 ImageDownloadCallback; | 583 ImageDownloadCallback; |
584 | 584 |
585 // Sends a request to download the given image |url| and returns the unique | 585 // Sends a request to download the given image |url| and returns the unique |
586 // id of the download request. When the download is finished, |callback| will | 586 // id of the download request. When the download is finished, |callback| will |
587 // be called with the bitmaps received from the renderer. If |is_favicon| is | 587 // be called with the bitmaps received from the renderer. |
588 // true, the cookies are not sent and not accepted during download. | 588 // If |is_favicon| is true, the cookies are not sent and not accepted during |
| 589 // download. |
589 // Bitmaps with pixel sizes larger than |max_bitmap_size| are filtered out | 590 // Bitmaps with pixel sizes larger than |max_bitmap_size| are filtered out |
590 // from the bitmap results. If there are no bitmap results <= | 591 // from the bitmap results. If there are no bitmap results <= |
591 // |max_bitmap_size|, the smallest bitmap is resized to |max_bitmap_size| and | 592 // |max_bitmap_size|, the smallest bitmap is resized to |max_bitmap_size| and |
592 // is the only result. A |max_bitmap_size| of 0 means unlimited. | 593 // is the only result. A |max_bitmap_size| of 0 means unlimited. |
| 594 // If |bypass_cache| is true, |url| is requested from the server even if it |
| 595 // is present in the browser cache. |
593 virtual int DownloadImage(const GURL& url, | 596 virtual int DownloadImage(const GURL& url, |
594 bool is_favicon, | 597 bool is_favicon, |
595 uint32_t max_bitmap_size, | 598 uint32_t max_bitmap_size, |
| 599 bool bypass_cache, |
596 const ImageDownloadCallback& callback) = 0; | 600 const ImageDownloadCallback& callback) = 0; |
597 | 601 |
598 // Returns true if the WebContents is responsible for displaying a subframe | 602 // Returns true if the WebContents is responsible for displaying a subframe |
599 // in a different process from its parent page. | 603 // in a different process from its parent page. |
600 // TODO: this doesn't really belong here. With site isolation, this should be | 604 // TODO: this doesn't really belong here. With site isolation, this should be |
601 // removed since we can then embed iframes in different processes. | 605 // removed since we can then embed iframes in different processes. |
602 virtual bool IsSubframe() const = 0; | 606 virtual bool IsSubframe() const = 0; |
603 | 607 |
604 // Finds text on a page. | 608 // Finds text on a page. |
605 virtual void Find(int request_id, | 609 virtual void Find(int request_id, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 | 643 |
640 private: | 644 private: |
641 // This interface should only be implemented inside content. | 645 // This interface should only be implemented inside content. |
642 friend class WebContentsImpl; | 646 friend class WebContentsImpl; |
643 WebContents() {} | 647 WebContents() {} |
644 }; | 648 }; |
645 | 649 |
646 } // namespace content | 650 } // namespace content |
647 | 651 |
648 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 652 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |