| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "base/memory/linked_ptr.h" | 11 #include "base/memory/linked_ptr.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 #include "content/browser/frame_host/navigation_controller_delegate.h" | 14 #include "content/browser/frame_host/navigation_controller_delegate.h" |
| 15 #include "content/browser/frame_host/navigation_entry_impl.h" | 15 #include "content/browser/frame_host/navigation_entry_impl.h" |
| 16 #include "content/browser/ssl/ssl_manager.h" | 16 #include "content/browser/ssl/ssl_manager.h" |
| 17 #include "content/public/browser/navigation_controller.h" | 17 #include "content/public/browser/navigation_controller.h" |
| 18 #include "content/public/browser/navigation_type.h" | 18 #include "content/public/browser/navigation_type.h" |
| 19 | 19 |
| 20 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 20 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 class FrameTreeNode; |
| 23 class RenderFrameHostImpl; | 24 class RenderFrameHostImpl; |
| 24 class NavigationEntryScreenshotManager; | 25 class NavigationEntryScreenshotManager; |
| 25 class SiteInstance; | 26 class SiteInstance; |
| 26 struct LoadCommittedDetails; | 27 struct LoadCommittedDetails; |
| 27 | 28 |
| 28 class CONTENT_EXPORT NavigationControllerImpl | 29 class CONTENT_EXPORT NavigationControllerImpl |
| 29 : public NON_EXPORTED_BASE(NavigationController) { | 30 : public NON_EXPORTED_BASE(NavigationController) { |
| 30 public: | 31 public: |
| 31 NavigationControllerImpl( | 32 NavigationControllerImpl( |
| 32 NavigationControllerDelegate* delegate, | 33 NavigationControllerDelegate* delegate, |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 110 |
| 110 // Return the index of the entry with the given unique id, or -1 if not found. | 111 // Return the index of the entry with the given unique id, or -1 if not found. |
| 111 int GetEntryIndexWithUniqueID(int nav_entry_id) const; | 112 int GetEntryIndexWithUniqueID(int nav_entry_id) const; |
| 112 | 113 |
| 113 // Return the entry with the corresponding instance and page_id, or NULL if | 114 // Return the entry with the corresponding instance and page_id, or NULL if |
| 114 // not found. | 115 // not found. |
| 115 NavigationEntryImpl* GetEntryWithPageID( | 116 NavigationEntryImpl* GetEntryWithPageID( |
| 116 SiteInstance* instance, | 117 SiteInstance* instance, |
| 117 int32 page_id) const; | 118 int32 page_id) const; |
| 118 | 119 |
| 120 // Whether the given frame has committed any navigations yet. |
| 121 // This currently only returns true in --site-per-process mode. |
| 122 // TODO(creis): Create FrameNavigationEntries by default so this always works. |
| 123 bool HasCommittedRealLoad(FrameTreeNode* frame_tree_node) const; |
| 124 |
| 119 NavigationControllerDelegate* delegate() const { | 125 NavigationControllerDelegate* delegate() const { |
| 120 return delegate_; | 126 return delegate_; |
| 121 } | 127 } |
| 122 | 128 |
| 123 // For use by WebContentsImpl ------------------------------------------------ | 129 // For use by WebContentsImpl ------------------------------------------------ |
| 124 | 130 |
| 125 // Allow renderer-initiated navigations to create a pending entry when the | 131 // Allow renderer-initiated navigations to create a pending entry when the |
| 126 // provisional load starts. | 132 // provisional load starts. |
| 127 void SetPendingEntry(content::NavigationEntryImpl* entry); | 133 void SetPendingEntry(content::NavigationEntryImpl* entry); |
| 128 | 134 |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 TimeSmoother time_smoother_; | 436 TimeSmoother time_smoother_; |
| 431 | 437 |
| 432 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; | 438 scoped_ptr<NavigationEntryScreenshotManager> screenshot_manager_; |
| 433 | 439 |
| 434 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); | 440 DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl); |
| 435 }; | 441 }; |
| 436 | 442 |
| 437 } // namespace content | 443 } // namespace content |
| 438 | 444 |
| 439 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ | 445 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |