| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 // The callbacks can be inside of this function, or at some future time. | 603 // The callbacks can be inside of this function, or at some future time. |
| 604 // | 604 // |
| 605 // The entry has a PageID of -1 if newly created (corresponding to navigation | 605 // The entry has a PageID of -1 if newly created (corresponding to navigation |
| 606 // to a new URL). | 606 // to a new URL). |
| 607 // | 607 // |
| 608 // If this method returns false, then the navigation is discarded (equivalent | 608 // If this method returns false, then the navigation is discarded (equivalent |
| 609 // to calling DiscardPendingEntry on the NavigationController). | 609 // to calling DiscardPendingEntry on the NavigationController). |
| 610 bool NavigateToPendingEntry( | 610 bool NavigateToPendingEntry( |
| 611 NavigationController::ReloadType reload_type) override; | 611 NavigationController::ReloadType reload_type) override; |
| 612 | 612 |
| 613 // Sets the history for this WebContentsImpl to |history_length| entries, and | 613 // Sets the history for this WebContentsImpl to |history_length| entries, with |
| 614 // moves the current page_id to the last entry in the list if it's valid. | 614 // an offset of |history_offset|. |
| 615 // This is mainly used when a prerendered page is swapped into the current | 615 void SetHistoryOffsetAndLength(int history_offset, |
| 616 // tab. The method is virtual for testing. | 616 int history_length) override; |
| 617 void SetHistoryLengthAndPrune(const SiteInstance* site_instance, | |
| 618 int merge_history_length, | |
| 619 int32 minimum_page_id) override; | |
| 620 | 617 |
| 621 // Called by InterstitialPageImpl when it creates a RenderFrameHost. | 618 // Called by InterstitialPageImpl when it creates a RenderFrameHost. |
| 622 void RenderFrameForInterstitialPageCreated( | 619 void RenderFrameForInterstitialPageCreated( |
| 623 RenderFrameHost* render_frame_host) override; | 620 RenderFrameHost* render_frame_host) override; |
| 624 | 621 |
| 625 // Sets the passed interstitial as the currently showing interstitial. | 622 // Sets the passed interstitial as the currently showing interstitial. |
| 626 // No interstitial page should already be attached. | 623 // No interstitial page should already be attached. |
| 627 void AttachInterstitialPage(InterstitialPageImpl* interstitial_page) override; | 624 void AttachInterstitialPage(InterstitialPageImpl* interstitial_page) override; |
| 628 | 625 |
| 629 // Unsets the currently showing interstitial. | 626 // Unsets the currently showing interstitial. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 void ResetLoadProgressState(); | 878 void ResetLoadProgressState(); |
| 882 | 879 |
| 883 // Calculates the progress of the current load and notifies the delegate. | 880 // Calculates the progress of the current load and notifies the delegate. |
| 884 void SendLoadProgressChanged(); | 881 void SendLoadProgressChanged(); |
| 885 | 882 |
| 886 // Called once when the last frame on the page has stopped loading. | 883 // Called once when the last frame on the page has stopped loading. |
| 887 void DidStopLoading(RenderFrameHost* render_frame_host); | 884 void DidStopLoading(RenderFrameHost* render_frame_host); |
| 888 | 885 |
| 889 // Misc non-view stuff ------------------------------------------------------- | 886 // Misc non-view stuff ------------------------------------------------------- |
| 890 | 887 |
| 888 // Sets the history for a specified RenderViewHost to |history_length| |
| 889 // entries, with an offset of |history_offset|. |
| 890 void SetHistoryOffsetAndLengthForView(RenderViewHost* render_view_host, |
| 891 int history_offset, |
| 892 int history_length); |
| 893 |
| 891 // Helper functions for sending notifications. | 894 // Helper functions for sending notifications. |
| 892 void NotifyViewSwapped(RenderViewHost* old_host, RenderViewHost* new_host); | 895 void NotifyViewSwapped(RenderViewHost* old_host, RenderViewHost* new_host); |
| 893 void NotifyFrameSwapped(RenderFrameHost* old_host, RenderFrameHost* new_host); | 896 void NotifyFrameSwapped(RenderFrameHost* old_host, RenderFrameHost* new_host); |
| 894 void NotifyDisconnected(); | 897 void NotifyDisconnected(); |
| 895 | 898 |
| 896 void SetEncoding(const std::string& encoding); | 899 void SetEncoding(const std::string& encoding); |
| 897 | 900 |
| 898 // TODO(creis): This should take in a FrameTreeNode to know which node's | 901 // TODO(creis): This should take in a FrameTreeNode to know which node's |
| 899 // render manager to return. For now, we just return the root's. | 902 // render manager to return. For now, we just return the root's. |
| 900 RenderFrameHostManager* GetRenderManager() const; | 903 RenderFrameHostManager* GetRenderManager() const; |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 bool virtual_keyboard_requested_; | 1233 bool virtual_keyboard_requested_; |
| 1231 | 1234 |
| 1232 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1235 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
| 1233 | 1236 |
| 1234 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1237 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
| 1235 }; | 1238 }; |
| 1236 | 1239 |
| 1237 } // namespace content | 1240 } // namespace content |
| 1238 | 1241 |
| 1239 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1242 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |