| 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_NAVIGATOR_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/browser/navigation_controller.h" | 10 #include "content/public/browser/navigation_controller.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // objects that are using it and will be released once all nodes that use it are | 30 // objects that are using it and will be released once all nodes that use it are |
| 31 // freed. The Navigator is bound to a single frame tree and cannot be used by | 31 // freed. The Navigator is bound to a single frame tree and cannot be used by |
| 32 // multiple instances of FrameTree. | 32 // multiple instances of FrameTree. |
| 33 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad | 33 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad |
| 34 // from WebContentsImpl to this interface. | 34 // from WebContentsImpl to this interface. |
| 35 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { | 35 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { |
| 36 public: | 36 public: |
| 37 // Returns the NavigationController associated with this Navigator. | 37 // Returns the NavigationController associated with this Navigator. |
| 38 virtual NavigationController* GetController(); | 38 virtual NavigationController* GetController(); |
| 39 | 39 |
| 40 | |
| 41 // Notifications coming from the RenderFrameHosts ---------------------------- | 40 // Notifications coming from the RenderFrameHosts ---------------------------- |
| 42 | 41 |
| 43 // The RenderFrameHostImpl started a provisional load. | 42 // The RenderFrameHostImpl started a provisional load. |
| 44 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 43 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
| 45 const GURL& url) {}; | 44 const GURL& url) {}; |
| 46 | 45 |
| 47 // The RenderFrameHostImpl has failed a provisional load. | 46 // The RenderFrameHostImpl has failed a provisional load. |
| 48 virtual void DidFailProvisionalLoadWithError( | 47 virtual void DidFailProvisionalLoadWithError( |
| 49 RenderFrameHostImpl* render_frame_host, | 48 RenderFrameHostImpl* render_frame_host, |
| 50 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {}; | 49 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {}; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 RenderFrameHostImpl* render_frame_host, | 110 RenderFrameHostImpl* render_frame_host, |
| 112 const GURL& url, | 111 const GURL& url, |
| 113 const std::vector<GURL>& redirect_chain, | 112 const std::vector<GURL>& redirect_chain, |
| 114 const Referrer& referrer, | 113 const Referrer& referrer, |
| 115 PageTransition page_transition, | 114 PageTransition page_transition, |
| 116 WindowOpenDisposition disposition, | 115 WindowOpenDisposition disposition, |
| 117 const GlobalRequestID& transferred_global_request_id, | 116 const GlobalRequestID& transferred_global_request_id, |
| 118 bool should_replace_current_entry, | 117 bool should_replace_current_entry, |
| 119 bool user_gesture) {} | 118 bool user_gesture) {} |
| 120 | 119 |
| 120 // Will crash the browser if |render_frame_host| is a Web-UI renderer that |
| 121 // tries to display a non Web UI |url|. |
| 122 virtual void CheckWebUIRendererDoesNotDisplayNormalURL( |
| 123 RenderFrameHostImpl* render_frame_host, |
| 124 const GURL& url) {} |
| 125 |
| 121 protected: | 126 protected: |
| 122 friend class base::RefCounted<Navigator>; | 127 friend class base::RefCounted<Navigator>; |
| 123 virtual ~Navigator() {} | 128 virtual ~Navigator() {} |
| 124 }; | 129 }; |
| 125 | 130 |
| 126 } // namespace content | 131 } // namespace content |
| 127 | 132 |
| 128 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ | 133 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
| OLD | NEW |