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 | 10 |
11 class GURL; | 11 class GURL; |
| 12 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 class NavigationControllerImpl; | 16 class NavigationControllerImpl; |
16 class NavigatorDelegate; | 17 class NavigatorDelegate; |
17 class RenderFrameHostImpl; | 18 class RenderFrameHostImpl; |
18 | 19 |
19 // Implementations of this interface are responsible for performing navigations | 20 // Implementations of this interface are responsible for performing navigations |
20 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode | 21 // in a node of the FrameTree. Its lifetime is bound to all FrameTreeNode |
21 // objects that are using it and will be released once all nodes that use it are | 22 // objects that are using it and will be released once all nodes that use it are |
22 // freed. The Navigator is bound to a single frame tree and cannot be used by | 23 // freed. The Navigator is bound to a single frame tree and cannot be used by |
23 // multiple instances of FrameTree. | 24 // multiple instances of FrameTree. |
24 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad | 25 // TODO(nasko): Move all navigation methods, such as didStartProvisionalLoad |
25 // from WebContentsImpl to this interface. | 26 // from WebContentsImpl to this interface. |
26 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { | 27 class CONTENT_EXPORT Navigator : public base::RefCounted<Navigator> { |
27 public: | 28 public: |
28 // The RenderFrameHostImpl started a provisional load. | 29 // The RenderFrameHostImpl started a provisional load. |
29 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 30 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
30 int64 frame_id, | 31 int64 frame_id, |
31 int64 parent_frame_id, | 32 int64 parent_frame_id, |
32 bool main_frame, | 33 bool main_frame, |
33 const GURL& url) {}; | 34 const GURL& url) {}; |
34 | 35 |
| 36 // The RenderFrameHostImpl has failed a provisional load. |
| 37 virtual void DidFailProvisionalLoadWithError( |
| 38 RenderFrameHostImpl* render_frame_host, |
| 39 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) {}; |
| 40 |
35 protected: | 41 protected: |
36 friend class base::RefCounted<Navigator>; | 42 friend class base::RefCounted<Navigator>; |
37 virtual ~Navigator() {} | 43 virtual ~Navigator() {} |
38 }; | 44 }; |
39 | 45 |
40 } // namespace content | 46 } // namespace content |
41 | 47 |
42 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ | 48 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ |
OLD | NEW |