| 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 <stdint.h> |
| 9 |
| 8 #include <vector> | 10 #include <vector> |
| 9 | 11 |
| 10 #include "base/basictypes.h" | 12 #include "base/macros.h" |
| 11 #include "content/browser/frame_host/render_frame_host_impl.h" | 13 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 12 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
| 13 #include "content/public/test/mock_render_process_host.h" | 15 #include "content/public/test/mock_render_process_host.h" |
| 14 #include "content/public/test/test_renderer_host.h" | 16 #include "content/public/test/test_renderer_host.h" |
| 15 #include "content/test/test_render_view_host.h" | 17 #include "content/test/test_render_view_host.h" |
| 16 #include "ui/base/page_transition_types.h" | 18 #include "ui/base/page_transition_types.h" |
| 17 | 19 |
| 18 struct FrameHostMsg_DidCommitProvisionalLoad_Params; | 20 struct FrameHostMsg_DidCommitProvisionalLoad_Params; |
| 19 | 21 |
| 20 namespace content { | 22 namespace content { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 | 37 |
| 36 class TestRenderFrameHost : public RenderFrameHostImpl, | 38 class TestRenderFrameHost : public RenderFrameHostImpl, |
| 37 public RenderFrameHostTester { | 39 public RenderFrameHostTester { |
| 38 public: | 40 public: |
| 39 TestRenderFrameHost(SiteInstance* site_instance, | 41 TestRenderFrameHost(SiteInstance* site_instance, |
| 40 RenderViewHostImpl* render_view_host, | 42 RenderViewHostImpl* render_view_host, |
| 41 RenderFrameHostDelegate* delegate, | 43 RenderFrameHostDelegate* delegate, |
| 42 RenderWidgetHostDelegate* rwh_delegate, | 44 RenderWidgetHostDelegate* rwh_delegate, |
| 43 FrameTree* frame_tree, | 45 FrameTree* frame_tree, |
| 44 FrameTreeNode* frame_tree_node, | 46 FrameTreeNode* frame_tree_node, |
| 45 int32 routing_id, | 47 int32_t routing_id, |
| 46 int32 widget_routing_id, | 48 int32_t widget_routing_id, |
| 47 int flags); | 49 int flags); |
| 48 ~TestRenderFrameHost() override; | 50 ~TestRenderFrameHost() override; |
| 49 | 51 |
| 50 // RenderFrameHostImpl overrides (same values, but in Test*/Mock* types) | 52 // RenderFrameHostImpl overrides (same values, but in Test*/Mock* types) |
| 51 TestRenderViewHost* GetRenderViewHost() override; | 53 TestRenderViewHost* GetRenderViewHost() override; |
| 52 MockRenderProcessHost* GetProcess() override; | 54 MockRenderProcessHost* GetProcess() override; |
| 53 | 55 |
| 54 // RenderFrameHostTester implementation. | 56 // RenderFrameHostTester implementation. |
| 55 void InitializeRenderFrameIfNeeded() override; | 57 void InitializeRenderFrameIfNeeded() override; |
| 56 TestRenderFrameHost* AppendChild(const std::string& frame_name) override; | 58 TestRenderFrameHost* AppendChild(const std::string& frame_name) override; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 private: | 133 private: |
| 132 void SendNavigateWithParameters(int page_id, | 134 void SendNavigateWithParameters(int page_id, |
| 133 int nav_entry_id, | 135 int nav_entry_id, |
| 134 bool did_create_new_entry, | 136 bool did_create_new_entry, |
| 135 const GURL& url, | 137 const GURL& url, |
| 136 ui::PageTransition transition, | 138 ui::PageTransition transition, |
| 137 int response_code, | 139 int response_code, |
| 138 const ModificationCallback& callback); | 140 const ModificationCallback& callback); |
| 139 | 141 |
| 140 // Computes the page ID for a pending navigation in this RenderFrameHost; | 142 // Computes the page ID for a pending navigation in this RenderFrameHost; |
| 141 int32 ComputeNextPageID(); | 143 int32_t ComputeNextPageID(); |
| 142 | 144 |
| 143 TestRenderFrameHostCreationObserver child_creation_observer_; | 145 TestRenderFrameHostCreationObserver child_creation_observer_; |
| 144 | 146 |
| 145 std::string contents_mime_type_; | 147 std::string contents_mime_type_; |
| 146 | 148 |
| 147 // See set_simulate_history_list_was_cleared() above. | 149 // See set_simulate_history_list_was_cleared() above. |
| 148 bool simulate_history_list_was_cleared_; | 150 bool simulate_history_list_was_cleared_; |
| 149 | 151 |
| 150 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 152 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
| 151 }; | 153 }; |
| 152 | 154 |
| 153 } // namespace content | 155 } // namespace content |
| 154 | 156 |
| 155 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 157 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
| OLD | NEW |