| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_RENDER_VIEW_H_ | 5 #ifndef CHROME_RENDERER_RENDER_VIEW_H_ |
| 6 #define CHROME_RENDERER_RENDER_VIEW_H_ | 6 #define CHROME_RENDERER_RENDER_VIEW_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 // request and passed back to the DidDownloadImage method. If the image has | 716 // request and passed back to the DidDownloadImage method. If the image has |
| 717 // multiple frames, the frame whose size is image_size is returned. If the | 717 // multiple frames, the frame whose size is image_size is returned. If the |
| 718 // image doesn't have a frame at the specified size, the first is returned. | 718 // image doesn't have a frame at the specified size, the first is returned. |
| 719 bool DownloadImage(int id, const GURL& image_url, int image_size); | 719 bool DownloadImage(int id, const GURL& image_url, int image_size); |
| 720 | 720 |
| 721 // This callback is triggered when DownloadImage completes, either | 721 // This callback is triggered when DownloadImage completes, either |
| 722 // succesfully or with a failure. See DownloadImage for more details. | 722 // succesfully or with a failure. See DownloadImage for more details. |
| 723 void DidDownloadImage(webkit_glue::ImageResourceFetcher* fetcher, | 723 void DidDownloadImage(webkit_glue::ImageResourceFetcher* fetcher, |
| 724 const SkBitmap& image); | 724 const SkBitmap& image); |
| 725 | 725 |
| 726 // Check whether the preferred size has changed. This is called periodically |
| 727 // by preferred_size_change_timer_. |
| 728 void CheckPreferredSize(); |
| 729 |
| 726 enum ErrorPageType { | 730 enum ErrorPageType { |
| 727 DNS_ERROR, | 731 DNS_ERROR, |
| 728 HTTP_404, | 732 HTTP_404, |
| 729 CONNECTION_ERROR, | 733 CONNECTION_ERROR, |
| 730 }; | 734 }; |
| 731 | 735 |
| 732 // Alternate error page helpers. | 736 // Alternate error page helpers. |
| 733 GURL GetAlternateErrorPageURL( | 737 GURL GetAlternateErrorPageURL( |
| 734 const GURL& failed_url, ErrorPageType error_type); | 738 const GURL& failed_url, ErrorPageType error_type); |
| 735 bool MaybeLoadAlternateErrorPage( | 739 bool MaybeLoadAlternateErrorPage( |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 // it's for the selection clipboard. | 954 // it's for the selection clipboard. |
| 951 std::string selection_text_; | 955 std::string selection_text_; |
| 952 | 956 |
| 953 // Cache the preferred size of the page in order to prevent sending the IPC | 957 // Cache the preferred size of the page in order to prevent sending the IPC |
| 954 // when layout() recomputes but doesn't actually change sizes. | 958 // when layout() recomputes but doesn't actually change sizes. |
| 955 gfx::Size preferred_size_; | 959 gfx::Size preferred_size_; |
| 956 | 960 |
| 957 // If true, we send IPC messages when |preferred_size_| changes. | 961 // If true, we send IPC messages when |preferred_size_| changes. |
| 958 bool send_preferred_size_changes_; | 962 bool send_preferred_size_changes_; |
| 959 | 963 |
| 964 // Nasty hack. WebKit does not send us events when the preferred size changes, |
| 965 // so we must poll it. See also: |
| 966 // https://bugs.webkit.org/show_bug.cgi?id=32807. |
| 967 base::RepeatingTimer<RenderView> preferred_size_change_timer_; |
| 968 |
| 960 // The text selection the last time DidChangeSelection got called. | 969 // The text selection the last time DidChangeSelection got called. |
| 961 std::string last_selection_; | 970 std::string last_selection_; |
| 962 | 971 |
| 963 // Hopds a reference to the service which provides desktop notifications. | 972 // Hopds a reference to the service which provides desktop notifications. |
| 964 scoped_ptr<NotificationProvider> notification_provider_; | 973 scoped_ptr<NotificationProvider> notification_provider_; |
| 965 | 974 |
| 966 // Holds state pertaining to a navigation that we initiated. This is held by | 975 // Holds state pertaining to a navigation that we initiated. This is held by |
| 967 // the WebDataSource::ExtraData attribute. We use pending_navigation_state_ | 976 // the WebDataSource::ExtraData attribute. We use pending_navigation_state_ |
| 968 // as a temporary holder for the state until the WebDataSource corresponding | 977 // as a temporary holder for the state until the WebDataSource corresponding |
| 969 // to the new navigation is created. See DidCreateDataSource. | 978 // to the new navigation is created. See DidCreateDataSource. |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 int64 session_storage_namespace_id_; | 1026 int64 session_storage_namespace_id_; |
| 1018 | 1027 |
| 1019 // Page translation related objects. | 1028 // Page translation related objects. |
| 1020 TextTranslatorImpl text_translator_; | 1029 TextTranslatorImpl text_translator_; |
| 1021 scoped_ptr<PageTranslator> page_translator_; | 1030 scoped_ptr<PageTranslator> page_translator_; |
| 1022 | 1031 |
| 1023 DISALLOW_COPY_AND_ASSIGN(RenderView); | 1032 DISALLOW_COPY_AND_ASSIGN(RenderView); |
| 1024 }; | 1033 }; |
| 1025 | 1034 |
| 1026 #endif // CHROME_RENDERER_RENDER_VIEW_H_ | 1035 #endif // CHROME_RENDERER_RENDER_VIEW_H_ |
| OLD | NEW |