| 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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 void RenderFrameForInterstitialPageCreated( | 700 void RenderFrameForInterstitialPageCreated( |
| 701 RenderFrameHost* render_frame_host) override; | 701 RenderFrameHost* render_frame_host) override; |
| 702 | 702 |
| 703 // Sets the passed interstitial as the currently showing interstitial. | 703 // Sets the passed interstitial as the currently showing interstitial. |
| 704 // No interstitial page should already be attached. | 704 // No interstitial page should already be attached. |
| 705 void AttachInterstitialPage(InterstitialPageImpl* interstitial_page) override; | 705 void AttachInterstitialPage(InterstitialPageImpl* interstitial_page) override; |
| 706 | 706 |
| 707 // Unsets the currently showing interstitial. | 707 // Unsets the currently showing interstitial. |
| 708 void DetachInterstitialPage() override; | 708 void DetachInterstitialPage() override; |
| 709 | 709 |
| 710 // Changes the IsLoading state and notifies the delegate as needed. | 710 // Unpause the throbber if it was paused. |
| 711 // |details| is used to provide details on the load that just finished | 711 void DidProceedOnInterstitial() override; |
| 712 // (but can be null if not applicable). | |
| 713 void SetIsLoading(bool is_loading, | |
| 714 bool to_different_document, | |
| 715 LoadNotificationDetails* details) override; | |
| 716 | 712 |
| 717 typedef base::Callback<void(WebContents*)> CreatedCallback; | 713 typedef base::Callback<void(WebContents*)> CreatedCallback; |
| 718 | 714 |
| 719 // Forces overscroll to be disabled (used by touch emulation). | 715 // Forces overscroll to be disabled (used by touch emulation). |
| 720 void SetForceDisableOverscrollContent(bool force_disable); | 716 void SetForceDisableOverscrollContent(bool force_disable); |
| 721 | 717 |
| 722 AudioStreamMonitor* audio_stream_monitor() { | 718 AudioStreamMonitor* audio_stream_monitor() { |
| 723 return &audio_stream_monitor_; | 719 return &audio_stream_monitor_; |
| 724 } | 720 } |
| 725 | 721 |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 WebContentsImpl* GetCreatedWindow(int route_id); | 974 WebContentsImpl* GetCreatedWindow(int route_id); |
| 979 | 975 |
| 980 // Tracking loading progress ------------------------------------------------- | 976 // Tracking loading progress ------------------------------------------------- |
| 981 | 977 |
| 982 // Resets the tracking state of the current load progress. | 978 // Resets the tracking state of the current load progress. |
| 983 void ResetLoadProgressState(); | 979 void ResetLoadProgressState(); |
| 984 | 980 |
| 985 // Notifies the delegate that the load progress was updated. | 981 // Notifies the delegate that the load progress was updated. |
| 986 void SendChangeLoadProgress(); | 982 void SendChangeLoadProgress(); |
| 987 | 983 |
| 984 // Notifies the delegate of a change in loading state. |
| 985 // |details| is used to provide details on the load that just finished |
| 986 // (but can be null if not applicable). |
| 987 // |due_to_interstitial| is true if the change in load state occurred because |
| 988 // an interstitial page started showing/proceeded. |
| 989 void LoadingStateChanged(bool to_different_document, |
| 990 bool due_to_interstitial, |
| 991 LoadNotificationDetails* details); |
| 992 |
| 988 // Misc non-view stuff ------------------------------------------------------- | 993 // Misc non-view stuff ------------------------------------------------------- |
| 989 | 994 |
| 990 // Sets the history for a specified RenderViewHost to |history_length| | 995 // Sets the history for a specified RenderViewHost to |history_length| |
| 991 // entries, with an offset of |history_offset|. | 996 // entries, with an offset of |history_offset|. |
| 992 void SetHistoryOffsetAndLengthForView(RenderViewHost* render_view_host, | 997 void SetHistoryOffsetAndLengthForView(RenderViewHost* render_view_host, |
| 993 int history_offset, | 998 int history_offset, |
| 994 int history_length); | 999 int history_length); |
| 995 | 1000 |
| 996 // Helper functions for sending notifications. | 1001 // Helper functions for sending notifications. |
| 997 void NotifyViewSwapped(RenderViewHost* old_host, RenderViewHost* new_host); | 1002 void NotifyViewSwapped(RenderViewHost* old_host, RenderViewHost* new_host); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 | 1078 |
| 1074 // If this WebContents is part of a "tree of WebContents", then this contains | 1079 // If this WebContents is part of a "tree of WebContents", then this contains |
| 1075 // information about the structure. | 1080 // information about the structure. |
| 1076 scoped_ptr<WebContentsTreeNode> node_; | 1081 scoped_ptr<WebContentsTreeNode> node_; |
| 1077 | 1082 |
| 1078 // SavePackage, lazily created. | 1083 // SavePackage, lazily created. |
| 1079 scoped_refptr<SavePackage> save_package_; | 1084 scoped_refptr<SavePackage> save_package_; |
| 1080 | 1085 |
| 1081 // Data for loading state ---------------------------------------------------- | 1086 // Data for loading state ---------------------------------------------------- |
| 1082 | 1087 |
| 1083 // Indicates whether we're currently loading a resource. | |
| 1084 bool is_loading_; | |
| 1085 | |
| 1086 // Indicates whether the current load is to a different document. Only valid | 1088 // Indicates whether the current load is to a different document. Only valid |
| 1087 // if is_loading_ is true. | 1089 // if is_loading_ is true. |
| 1088 bool is_load_to_different_document_; | 1090 bool is_load_to_different_document_; |
| 1089 | 1091 |
| 1090 // Indicates if the tab is considered crashed. | 1092 // Indicates if the tab is considered crashed. |
| 1091 base::TerminationStatus crashed_status_; | 1093 base::TerminationStatus crashed_status_; |
| 1092 int crashed_error_code_; | 1094 int crashed_error_code_; |
| 1093 | 1095 |
| 1094 // Whether this WebContents is waiting for a first-response for the | 1096 // Whether this WebContents is waiting for a first-response for the |
| 1095 // main resource of the page. This controls whether the throbber state is | 1097 // main resource of the page. This controls whether the throbber state is |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 // Adds/removes a callback called on creation of each new WebContents. | 1336 // Adds/removes a callback called on creation of each new WebContents. |
| 1335 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1337 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1336 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1338 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1337 | 1339 |
| 1338 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1340 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
| 1339 }; | 1341 }; |
| 1340 | 1342 |
| 1341 } // namespace content | 1343 } // namespace content |
| 1342 | 1344 |
| 1343 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1345 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |