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_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "content/browser/frame_host/navigator.h" | 9 #include "content/browser/frame_host/navigator.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 class NavigationControllerImpl; | 14 class NavigationControllerImpl; |
15 class NavigatorDelegate; | 15 class NavigatorDelegate; |
16 | 16 |
17 // This class is an implementation of Navigator, responsible for managing | 17 // This class is an implementation of Navigator, responsible for managing |
18 // navigations in regular browser tabs. | 18 // navigations in regular browser tabs. |
19 class CONTENT_EXPORT NavigatorImpl : public Navigator { | 19 class CONTENT_EXPORT NavigatorImpl : public Navigator { |
20 public: | 20 public: |
21 NavigatorImpl(NavigationControllerImpl* navigation_controller, | 21 NavigatorImpl(NavigationControllerImpl* navigation_controller, |
22 NavigatorDelegate* delegate); | 22 NavigatorDelegate* delegate); |
23 | 23 |
24 // Navigator implementation. | 24 // Navigator implementation. |
25 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 25 virtual void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
26 int64 frame_id, | 26 int64 frame_id, |
27 int64 parent_frame_id, | 27 int64 parent_frame_id, |
28 bool main_frame, | 28 bool main_frame, |
29 const GURL& url) OVERRIDE; | 29 const GURL& url) OVERRIDE; |
| 30 virtual void DidFailProvisionalLoadWithError( |
| 31 RenderFrameHostImpl* render_frame_host, |
| 32 const FrameHostMsg_DidFailProvisionalLoadWithError_Params& params) |
| 33 OVERRIDE; |
30 | 34 |
31 private: | 35 private: |
32 virtual ~NavigatorImpl() {} | 36 virtual ~NavigatorImpl() {} |
33 | 37 |
34 // The NavigationController that will keep track of session history for all | 38 // The NavigationController that will keep track of session history for all |
35 // RenderFrameHost objects using this NavigatorImpl. | 39 // RenderFrameHost objects using this NavigatorImpl. |
36 // TODO(nasko): Move ownership of the NavigationController from | 40 // TODO(nasko): Move ownership of the NavigationController from |
37 // WebContentsImpl to this class. | 41 // WebContentsImpl to this class. |
38 NavigationControllerImpl* controller_; | 42 NavigationControllerImpl* controller_; |
39 | 43 |
40 // Used to notify the object embedding this Navigator about navigation | 44 // Used to notify the object embedding this Navigator about navigation |
41 // events. Can be NULL in tests. | 45 // events. Can be NULL in tests. |
42 NavigatorDelegate* delegate_; | 46 NavigatorDelegate* delegate_; |
43 | 47 |
44 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); | 48 DISALLOW_COPY_AND_ASSIGN(NavigatorImpl); |
45 }; | 49 }; |
46 | 50 |
47 } // namespace content | 51 } // namespace content |
48 | 52 |
49 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ | 53 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_IMPL_H_ |
OLD | NEW |