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" |
11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/process/kill.h" | 13 #include "base/process/kill.h" |
14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
15 #include "base/supports_user_data.h" | 15 #include "base/supports_user_data.h" |
16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
17 #include "content/public/browser/invalidate_type.h" | 17 #include "content/public/browser/invalidate_type.h" |
18 #include "content/public/browser/navigation_controller.h" | 18 #include "content/public/browser/navigation_controller.h" |
19 #include "content/public/browser/page_navigator.h" | 19 #include "content/public/browser/page_navigator.h" |
20 #include "content/public/browser/save_page_type.h" | 20 #include "content/public/browser/save_page_type.h" |
21 #include "content/public/browser/web_ui.h" | 21 #include "content/public/browser/web_ui.h" |
22 #include "content/public/common/stop_find_action.h" | 22 #include "content/public/common/stop_find_action.h" |
23 #include "ipc/ipc_sender.h" | 23 #include "ipc/ipc_sender.h" |
| 24 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
24 #include "third_party/skia/include/core/SkColor.h" | 25 #include "third_party/skia/include/core/SkColor.h" |
25 #include "ui/base/window_open_disposition.h" | 26 #include "ui/base/window_open_disposition.h" |
26 #include "ui/gfx/geometry/rect.h" | 27 #include "ui/gfx/geometry/rect.h" |
27 #include "ui/gfx/native_widget_types.h" | 28 #include "ui/gfx/native_widget_types.h" |
28 | 29 |
29 #if defined(OS_ANDROID) | 30 #if defined(OS_ANDROID) |
30 #include "base/android/scoped_java_ref.h" | 31 #include "base/android/scoped_java_ref.h" |
31 #endif | 32 #endif |
32 | 33 |
33 namespace base { | 34 namespace base { |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 // id of the download request. When the download is finished, |callback| will | 566 // id of the download request. When the download is finished, |callback| will |
566 // be called with the bitmaps received from the renderer. If |is_favicon| is | 567 // be called with the bitmaps received from the renderer. If |is_favicon| is |
567 // true, the cookies are not sent and not accepted during download. | 568 // true, the cookies are not sent and not accepted during download. |
568 // Bitmaps with pixel sizes larger than |max_bitmap_size| are filtered out | 569 // Bitmaps with pixel sizes larger than |max_bitmap_size| are filtered out |
569 // from the bitmap results. If there are no bitmap results <= | 570 // from the bitmap results. If there are no bitmap results <= |
570 // |max_bitmap_size|, the smallest bitmap is resized to |max_bitmap_size| and | 571 // |max_bitmap_size|, the smallest bitmap is resized to |max_bitmap_size| and |
571 // is the only result. A |max_bitmap_size| of 0 means unlimited. | 572 // is the only result. A |max_bitmap_size| of 0 means unlimited. |
572 virtual int DownloadImage(const GURL& url, | 573 virtual int DownloadImage(const GURL& url, |
573 bool is_favicon, | 574 bool is_favicon, |
574 uint32_t max_bitmap_size, | 575 uint32_t max_bitmap_size, |
| 576 blink::WebURLRequest::CachePolicy cache_policy, |
575 const ImageDownloadCallback& callback) = 0; | 577 const ImageDownloadCallback& callback) = 0; |
576 | 578 |
577 // Returns true if the WebContents is responsible for displaying a subframe | 579 // Returns true if the WebContents is responsible for displaying a subframe |
578 // in a different process from its parent page. | 580 // in a different process from its parent page. |
579 // TODO: this doesn't really belong here. With site isolation, this should be | 581 // TODO: this doesn't really belong here. With site isolation, this should be |
580 // removed since we can then embed iframes in different processes. | 582 // removed since we can then embed iframes in different processes. |
581 virtual bool IsSubframe() const = 0; | 583 virtual bool IsSubframe() const = 0; |
582 | 584 |
583 // Finds text on a page. | 585 // Finds text on a page. |
584 virtual void Find(int request_id, | 586 virtual void Find(int request_id, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 | 620 |
619 private: | 621 private: |
620 // This interface should only be implemented inside content. | 622 // This interface should only be implemented inside content. |
621 friend class WebContentsImpl; | 623 friend class WebContentsImpl; |
622 WebContents() {} | 624 WebContents() {} |
623 }; | 625 }; |
624 | 626 |
625 } // namespace content | 627 } // namespace content |
626 | 628 |
627 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 629 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |