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_TEST_TEST_RENDER_FRAME_HOST_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "content/browser/frame_host/render_frame_host_impl.h" | 11 #include "content/browser/frame_host/render_frame_host_impl.h" |
12 #include "content/public/browser/web_contents_observer.h" | 12 #include "content/public/browser/web_contents_observer.h" |
13 #include "content/public/common/page_transition_types.h" | |
14 #include "content/public/test/test_renderer_host.h" | 13 #include "content/public/test/test_renderer_host.h" |
15 #include "content/test/test_render_view_host.h" | 14 #include "content/test/test_render_view_host.h" |
| 15 #include "ui/base/page_transition_types.h" |
16 | 16 |
17 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 17 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 class TestRenderFrameHostCreationObserver : public WebContentsObserver { | 21 class TestRenderFrameHostCreationObserver : public WebContentsObserver { |
22 public: | 22 public: |
23 explicit TestRenderFrameHostCreationObserver(WebContents* web_contents); | 23 explicit TestRenderFrameHostCreationObserver(WebContents* web_contents); |
24 virtual ~TestRenderFrameHostCreationObserver(); | 24 virtual ~TestRenderFrameHostCreationObserver(); |
25 | 25 |
(...skipping 16 matching lines...) Expand all Loading... |
42 int routing_id, | 42 int routing_id, |
43 bool is_swapped_out); | 43 bool is_swapped_out); |
44 virtual ~TestRenderFrameHost(); | 44 virtual ~TestRenderFrameHost(); |
45 | 45 |
46 // RenderFrameHostImpl overrides (same values, but in Test* types) | 46 // RenderFrameHostImpl overrides (same values, but in Test* types) |
47 virtual TestRenderViewHost* GetRenderViewHost() OVERRIDE; | 47 virtual TestRenderViewHost* GetRenderViewHost() OVERRIDE; |
48 | 48 |
49 // RenderFrameHostTester implementation. | 49 // RenderFrameHostTester implementation. |
50 virtual TestRenderFrameHost* AppendChild( | 50 virtual TestRenderFrameHost* AppendChild( |
51 const std::string& frame_name) OVERRIDE; | 51 const std::string& frame_name) OVERRIDE; |
52 virtual void SendNavigateWithTransition(int page_id, | 52 virtual void SendNavigateWithTransition( |
53 const GURL& url, | 53 int page_id, |
54 PageTransition transition) OVERRIDE; | 54 const GURL& url, |
| 55 ui::PageTransition transition) OVERRIDE; |
55 | 56 |
56 void SendNavigate(int page_id, const GURL& url); | 57 void SendNavigate(int page_id, const GURL& url); |
57 void SendFailedNavigate(int page_id, const GURL& url); | 58 void SendFailedNavigate(int page_id, const GURL& url); |
58 void SendNavigateWithTransitionAndResponseCode( | 59 void SendNavigateWithTransitionAndResponseCode( |
59 int page_id, | 60 int page_id, |
60 const GURL& url, PageTransition transition, | 61 const GURL& url, ui::PageTransition transition, |
61 int response_code); | 62 int response_code); |
62 void SendNavigateWithOriginalRequestURL( | 63 void SendNavigateWithOriginalRequestURL( |
63 int page_id, | 64 int page_id, |
64 const GURL& url, | 65 const GURL& url, |
65 const GURL& original_request_url); | 66 const GURL& original_request_url); |
66 void SendNavigateWithFile( | 67 void SendNavigateWithFile( |
67 int page_id, | 68 int page_id, |
68 const GURL& url, | 69 const GURL& url, |
69 const base::FilePath& file_path); | 70 const base::FilePath& file_path); |
70 void SendNavigateWithParams( | 71 void SendNavigateWithParams( |
71 FrameHostMsg_DidCommitProvisionalLoad_Params* params); | 72 FrameHostMsg_DidCommitProvisionalLoad_Params* params); |
72 void SendNavigateWithRedirects( | 73 void SendNavigateWithRedirects( |
73 int page_id, | 74 int page_id, |
74 const GURL& url, | 75 const GURL& url, |
75 const std::vector<GURL>& redirects); | 76 const std::vector<GURL>& redirects); |
76 void SendNavigateWithParameters( | 77 void SendNavigateWithParameters( |
77 int page_id, | 78 int page_id, |
78 const GURL& url, | 79 const GURL& url, |
79 PageTransition transition, | 80 ui::PageTransition transition, |
80 const GURL& original_request_url, | 81 const GURL& original_request_url, |
81 int response_code, | 82 int response_code, |
82 const base::FilePath* file_path_for_history_item, | 83 const base::FilePath* file_path_for_history_item, |
83 const std::vector<GURL>& redirects); | 84 const std::vector<GURL>& redirects); |
84 void SendBeginNavigationWithURL(const GURL& url); | 85 void SendBeginNavigationWithURL(const GURL& url); |
85 | 86 |
86 void DidDisownOpener(); | 87 void DidDisownOpener(); |
87 | 88 |
88 void set_contents_mime_type(const std::string& mime_type) { | 89 void set_contents_mime_type(const std::string& mime_type) { |
89 contents_mime_type_ = mime_type; | 90 contents_mime_type_ = mime_type; |
(...skipping 17 matching lines...) Expand all Loading... |
107 | 108 |
108 // See set_simulate_history_list_was_cleared() above. | 109 // See set_simulate_history_list_was_cleared() above. |
109 bool simulate_history_list_was_cleared_; | 110 bool simulate_history_list_was_cleared_; |
110 | 111 |
111 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 112 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
112 }; | 113 }; |
113 | 114 |
114 } // namespace content | 115 } // namespace content |
115 | 116 |
116 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 117 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
OLD | NEW |