Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "content/test/test_render_frame.h" | |
| 6 | |
| 7 #include "base/command_line.h" | |
| 8 #include "content/common/navigation_params.h" | |
| 9 #include "content/public/common/content_switches.h" | |
| 10 #include "content/public/common/resource_response.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 // static | |
| 15 RenderFrameImpl* TestRenderFrame::CreateTestRenderFrame( | |
| 16 RenderViewImpl* render_view, | |
| 17 int32 routing_id) { | |
| 18 return new TestRenderFrame(render_view, routing_id); | |
| 19 } | |
| 20 | |
| 21 TestRenderFrame::~TestRenderFrame() { | |
| 22 } | |
| 23 | |
| 24 void TestRenderFrame::Navigate(const CommonNavigationParams& common_params, | |
| 25 const StartNavigationParams& start_params, | |
| 26 const RequestNavigationParams& request_params) { | |
| 27 // PlzNavigate | |
| 28 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 29 switches::kEnableBrowserSideNavigation)) { | |
| 30 OnCommitNavigation(ResourceResponseHead(), GURL(), common_params, | |
| 31 request_params); | |
| 32 } else { | |
| 33 OnNavigate(common_params, start_params, request_params); | |
| 34 } | |
| 35 } | |
| 36 | |
| 37 void TestRenderFrame::SwapOut( | |
| 38 int proxy_routing_id, | |
| 39 bool is_loading, | |
| 40 const FrameReplicationState& replicated_frame_state) { | |
| 41 OnSwapOut(proxy_routing_id, is_loading, replicated_frame_state); | |
| 42 } | |
| 43 | |
| 44 void TestRenderFrame::SetEditableSelectionOffsets(int start, int end) { | |
| 45 OnSetEditableSelectionOffsets(start, end); | |
| 46 } | |
| 47 | |
| 48 void TestRenderFrame::ExtendSelectionAndDelete(int before, int after) { | |
| 49 OnExtendSelectionAndDelete(before, after); | |
| 50 } | |
| 51 | |
| 52 void TestRenderFrame::Unselect() { | |
| 53 OnUnselect(); | |
| 54 } | |
| 55 | |
| 56 void TestRenderFrame::SetAccessibilityMode(AccessibilityMode new_mode) { | |
| 57 OnSetAccessibilityMode(new_mode); | |
| 58 } | |
| 59 | |
| 60 void TestRenderFrame::SetCompositionFromExistingText( | |
| 61 int start, | |
| 62 int end, | |
| 63 const std::vector<blink::WebCompositionUnderline>& underlines) { | |
| 64 OnSetCompositionFromExistingText(start, end, underlines); | |
| 65 } | |
| 66 | |
| 67 TestRenderFrame::TestRenderFrame(RenderViewImpl* render_view, int32 routing_id) | |
|
nasko
2015/06/24 14:18:02
Let's move the constructor above the destructor. I
clamy
2015/06/24 14:51:03
Done.
| |
| 68 : RenderFrameImpl(render_view, routing_id) { | |
| 69 } | |
| 70 | |
| 71 } // namespace content | |
| OLD | NEW |