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/public/test/render_view_test.h" | 5 #include "content/public/test/render_view_test.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "components/scheduler/renderer/renderer_scheduler.h" |
8 #include "content/common/dom_storage/dom_storage_types.h" | 9 #include "content/common/dom_storage/dom_storage_types.h" |
9 #include "content/common/frame_messages.h" | 10 #include "content/common/frame_messages.h" |
10 #include "content/common/input_messages.h" | 11 #include "content/common/input_messages.h" |
11 #include "content/common/view_messages.h" | 12 #include "content/common/view_messages.h" |
12 #include "content/public/browser/content_browser_client.h" | 13 #include "content/public/browser/content_browser_client.h" |
13 #include "content/public/browser/native_web_keyboard_event.h" | 14 #include "content/public/browser/native_web_keyboard_event.h" |
14 #include "content/public/common/content_client.h" | 15 #include "content/public/common/content_client.h" |
15 #include "content/public/common/renderer_preferences.h" | 16 #include "content/public/common/renderer_preferences.h" |
16 #include "content/public/renderer/content_renderer_client.h" | 17 #include "content/public/renderer/content_renderer_client.h" |
17 #include "content/public/test/frame_load_waiter.h" | 18 #include "content/public/test/frame_load_waiter.h" |
18 #include "content/renderer/history_controller.h" | 19 #include "content/renderer/history_controller.h" |
19 #include "content/renderer/history_serialization.h" | 20 #include "content/renderer/history_serialization.h" |
20 #include "content/renderer/render_thread_impl.h" | 21 #include "content/renderer/render_thread_impl.h" |
21 #include "content/renderer/render_view_impl.h" | 22 #include "content/renderer/render_view_impl.h" |
22 #include "content/renderer/renderer_blink_platform_impl.h" | 23 #include "content/renderer/renderer_blink_platform_impl.h" |
23 #include "content/renderer/renderer_main_platform_delegate.h" | 24 #include "content/renderer/renderer_main_platform_delegate.h" |
24 #include "content/renderer/scheduler/renderer_scheduler.h" | |
25 #include "content/test/fake_compositor_dependencies.h" | 25 #include "content/test/fake_compositor_dependencies.h" |
26 #include "content/test/mock_render_process.h" | 26 #include "content/test/mock_render_process.h" |
27 #include "content/test/test_content_client.h" | 27 #include "content/test/test_content_client.h" |
28 #include "third_party/WebKit/public/platform/WebScreenInfo.h" | 28 #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
29 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 29 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
30 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 30 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
31 #include "third_party/WebKit/public/web/WebInputEvent.h" | 31 #include "third_party/WebKit/public/web/WebInputEvent.h" |
32 #include "third_party/WebKit/public/web/WebKit.h" | 32 #include "third_party/WebKit/public/web/WebKit.h" |
33 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 33 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
34 #include "third_party/WebKit/public/web/WebScriptSource.h" | 34 #include "third_party/WebKit/public/web/WebScriptSource.h" |
(...skipping 21 matching lines...) Expand all Loading... |
56 const int32 kNewFrameRouteId = 10; | 56 const int32 kNewFrameRouteId = 10; |
57 const int32 kSurfaceId = 42; | 57 const int32 kSurfaceId = 42; |
58 | 58 |
59 } // namespace | 59 } // namespace |
60 | 60 |
61 namespace content { | 61 namespace content { |
62 | 62 |
63 class RendererBlinkPlatformImplNoSandboxImpl | 63 class RendererBlinkPlatformImplNoSandboxImpl |
64 : public RendererBlinkPlatformImpl { | 64 : public RendererBlinkPlatformImpl { |
65 public: | 65 public: |
66 RendererBlinkPlatformImplNoSandboxImpl(RendererScheduler* scheduler) | 66 RendererBlinkPlatformImplNoSandboxImpl( |
| 67 scheduler::RendererScheduler* scheduler) |
67 : RendererBlinkPlatformImpl(scheduler) {} | 68 : RendererBlinkPlatformImpl(scheduler) {} |
68 | 69 |
69 virtual blink::WebSandboxSupport* sandboxSupport() { | 70 virtual blink::WebSandboxSupport* sandboxSupport() { |
70 return NULL; | 71 return NULL; |
71 } | 72 } |
72 }; | 73 }; |
73 | 74 |
74 RenderViewTest::RendererBlinkPlatformImplNoSandbox:: | 75 RenderViewTest::RendererBlinkPlatformImplNoSandbox:: |
75 RendererBlinkPlatformImplNoSandbox() { | 76 RendererBlinkPlatformImplNoSandbox() { |
76 renderer_scheduler_ = RendererScheduler::Create(); | 77 renderer_scheduler_ = scheduler::RendererScheduler::Create(); |
77 blink_platform_impl_.reset( | 78 blink_platform_impl_.reset( |
78 new RendererBlinkPlatformImplNoSandboxImpl(renderer_scheduler_.get())); | 79 new RendererBlinkPlatformImplNoSandboxImpl(renderer_scheduler_.get())); |
79 } | 80 } |
80 | 81 |
81 RenderViewTest::RendererBlinkPlatformImplNoSandbox:: | 82 RenderViewTest::RendererBlinkPlatformImplNoSandbox:: |
82 ~RendererBlinkPlatformImplNoSandbox() { | 83 ~RendererBlinkPlatformImplNoSandbox() { |
83 } | 84 } |
84 | 85 |
85 blink::Platform* RenderViewTest::RendererBlinkPlatformImplNoSandbox::Get() { | 86 blink::Platform* RenderViewTest::RendererBlinkPlatformImplNoSandbox::Get() { |
86 return blink_platform_impl_.get(); | 87 return blink_platform_impl_.get(); |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 459 |
459 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(), | 460 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(), |
460 request_params); | 461 request_params); |
461 | 462 |
462 // The load actually happens asynchronously, so we pump messages to process | 463 // The load actually happens asynchronously, so we pump messages to process |
463 // the pending continuation. | 464 // the pending continuation. |
464 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); | 465 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); |
465 } | 466 } |
466 | 467 |
467 } // namespace content | 468 } // namespace content |
OLD | NEW |