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