| 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 <memory> |
| 8 |
| 8 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| 10 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 11 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
| 11 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 12 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| 12 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 13 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 13 #include "content/browser/site_instance_impl.h" | 14 #include "content/browser/site_instance_impl.h" |
| 14 #include "content/common/dom_storage/dom_storage_types.h" | 15 #include "content/common/dom_storage/dom_storage_types.h" |
| 15 #include "content/common/frame_messages.h" | 16 #include "content/common/frame_messages.h" |
| 16 #include "content/common/site_isolation_policy.h" | 17 #include "content/common/site_isolation_policy.h" |
| 17 #include "content/common/view_messages.h" | 18 #include "content/common/view_messages.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 DCHECK(color_profile->empty()); | 182 DCHECK(color_profile->empty()); |
| 182 return false; | 183 return false; |
| 183 } | 184 } |
| 184 | 185 |
| 185 gfx::Rect TestRenderWidgetHostView::GetBoundsInRootWindow() { | 186 gfx::Rect TestRenderWidgetHostView::GetBoundsInRootWindow() { |
| 186 return gfx::Rect(); | 187 return gfx::Rect(); |
| 187 } | 188 } |
| 188 | 189 |
| 189 void TestRenderWidgetHostView::OnSwapCompositorFrame( | 190 void TestRenderWidgetHostView::OnSwapCompositorFrame( |
| 190 uint32_t output_surface_id, | 191 uint32_t output_surface_id, |
| 191 scoped_ptr<cc::CompositorFrame> frame) { | 192 std::unique_ptr<cc::CompositorFrame> frame) { |
| 192 did_swap_compositor_frame_ = true; | 193 did_swap_compositor_frame_ = true; |
| 193 } | 194 } |
| 194 | 195 |
| 195 bool TestRenderWidgetHostView::LockMouse() { | 196 bool TestRenderWidgetHostView::LockMouse() { |
| 196 return false; | 197 return false; |
| 197 } | 198 } |
| 198 | 199 |
| 199 void TestRenderWidgetHostView::UnlockMouse() { | 200 void TestRenderWidgetHostView::UnlockMouse() { |
| 200 } | 201 } |
| 201 | 202 |
| 202 TestRenderViewHost::TestRenderViewHost(SiteInstance* instance, | 203 TestRenderViewHost::TestRenderViewHost( |
| 203 scoped_ptr<RenderWidgetHostImpl> widget, | 204 SiteInstance* instance, |
| 204 RenderViewHostDelegate* delegate, | 205 std::unique_ptr<RenderWidgetHostImpl> widget, |
| 205 int32_t main_frame_routing_id, | 206 RenderViewHostDelegate* delegate, |
| 206 bool swapped_out) | 207 int32_t main_frame_routing_id, |
| 208 bool swapped_out) |
| 207 : RenderViewHostImpl(instance, | 209 : RenderViewHostImpl(instance, |
| 208 std::move(widget), | 210 std::move(widget), |
| 209 delegate, | 211 delegate, |
| 210 main_frame_routing_id, | 212 main_frame_routing_id, |
| 211 swapped_out, | 213 swapped_out, |
| 212 false /* has_initialized_audio_host */), | 214 false /* has_initialized_audio_host */), |
| 213 delete_counter_(NULL), | 215 delete_counter_(NULL), |
| 214 opener_frame_route_id_(MSG_ROUTING_NONE) { | 216 opener_frame_route_id_(MSG_ROUTING_NONE) { |
| 215 // TestRenderWidgetHostView installs itself into this->view_ in its | 217 // TestRenderWidgetHostView installs itself into this->view_ in its |
| 216 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is | 218 // constructor, and deletes itself when TestRenderWidgetHostView::Destroy() is |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 316 |
| 315 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { | 317 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { |
| 316 return contents()->GetMainFrame(); | 318 return contents()->GetMainFrame(); |
| 317 } | 319 } |
| 318 | 320 |
| 319 TestWebContents* RenderViewHostImplTestHarness::contents() { | 321 TestWebContents* RenderViewHostImplTestHarness::contents() { |
| 320 return static_cast<TestWebContents*>(web_contents()); | 322 return static_cast<TestWebContents*>(web_contents()); |
| 321 } | 323 } |
| 322 | 324 |
| 323 } // namespace content | 325 } // namespace content |
| OLD | NEW |