| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/test/test_render_view_host.h" | 5 #include "content/test/test_render_view_host.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 10 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 bool TestRenderViewHost::CreateTestRenderView( | 228 bool TestRenderViewHost::CreateTestRenderView( |
| 229 const base::string16& frame_name, | 229 const base::string16& frame_name, |
| 230 int opener_frame_route_id, | 230 int opener_frame_route_id, |
| 231 int proxy_route_id, | 231 int proxy_route_id, |
| 232 int32_t max_page_id, | 232 int32_t max_page_id, |
| 233 bool window_was_created_with_opener) { | 233 bool window_was_created_with_opener) { |
| 234 FrameReplicationState replicated_state; | 234 FrameReplicationState replicated_state; |
| 235 replicated_state.name = base::UTF16ToUTF8(frame_name); | 235 replicated_state.name = base::UTF16ToUTF8(frame_name); |
| 236 return CreateRenderView(opener_frame_route_id, proxy_route_id, max_page_id, | 236 return CreateRenderView(opener_frame_route_id, proxy_route_id, max_page_id, |
| 237 replicated_state, window_was_created_with_opener); | 237 replicated_state, window_was_created_with_opener, |
| 238 0.0); |
| 238 } | 239 } |
| 239 | 240 |
| 240 bool TestRenderViewHost::CreateRenderView( | 241 bool TestRenderViewHost::CreateRenderView( |
| 241 int opener_frame_route_id, | 242 int opener_frame_route_id, |
| 242 int proxy_route_id, | 243 int proxy_route_id, |
| 243 int32_t max_page_id, | 244 int32_t max_page_id, |
| 244 const FrameReplicationState& replicated_frame_state, | 245 const FrameReplicationState& replicated_frame_state, |
| 245 bool window_was_created_with_opener) { | 246 bool window_was_created_with_opener, double zoom_level) { |
| 246 DCHECK(!IsRenderViewLive()); | 247 DCHECK(!IsRenderViewLive()); |
| 247 GetWidget()->set_renderer_initialized(true); | 248 GetWidget()->set_renderer_initialized(true); |
| 248 DCHECK(IsRenderViewLive()); | 249 DCHECK(IsRenderViewLive()); |
| 249 opener_frame_route_id_ = opener_frame_route_id; | 250 opener_frame_route_id_ = opener_frame_route_id; |
| 250 RenderFrameHost* main_frame = GetMainFrame(); | 251 RenderFrameHost* main_frame = GetMainFrame(); |
| 251 if (main_frame) | 252 if (main_frame) |
| 252 static_cast<RenderFrameHostImpl*>(main_frame)->SetRenderFrameCreated(true); | 253 static_cast<RenderFrameHostImpl*>(main_frame)->SetRenderFrameCreated(true); |
| 253 | 254 |
| 254 return true; | 255 return true; |
| 255 } | 256 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 317 |
| 317 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { | 318 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { |
| 318 return contents()->GetMainFrame(); | 319 return contents()->GetMainFrame(); |
| 319 } | 320 } |
| 320 | 321 |
| 321 TestWebContents* RenderViewHostImplTestHarness::contents() { | 322 TestWebContents* RenderViewHostImplTestHarness::contents() { |
| 322 return static_cast<TestWebContents*>(web_contents()); | 323 return static_cast<TestWebContents*>(web_contents()); |
| 323 } | 324 } |
| 324 | 325 |
| 325 } // namespace content | 326 } // namespace content |
| OLD | NEW |