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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "content/public/browser/content_browser_client.h" | 6 #include "content/public/browser/content_browser_client.h" |
7 #include "content/public/common/content_client.h" | 7 #include "content/public/common/content_client.h" |
8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
9 #include "content/public/renderer/content_renderer_client.h" | 9 #include "content/public/renderer/content_renderer_client.h" |
10 #include "content/renderer/render_process_impl.h" | 10 #include "content/renderer/render_process_impl.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 ContentBrowserClient content_browser_client; | 50 ContentBrowserClient content_browser_client; |
51 ContentRendererClient content_renderer_client; | 51 ContentRendererClient content_renderer_client; |
52 SetContentClient(&content_client); | 52 SetContentClient(&content_client); |
53 SetBrowserClientForTesting(&content_browser_client); | 53 SetBrowserClientForTesting(&content_browser_client); |
54 SetRendererClientForTesting(&content_renderer_client); | 54 SetRendererClientForTesting(&content_renderer_client); |
55 base::MessageLoopForIO message_loop_; | 55 base::MessageLoopForIO message_loop_; |
56 | 56 |
57 std::string channel_id = IPC::Channel::GenerateVerifiedChannelID( | 57 std::string channel_id = IPC::Channel::GenerateVerifiedChannelID( |
58 std::string()); | 58 std::string()); |
59 DummyListener dummy_listener; | 59 DummyListener dummy_listener; |
60 IPC::Channel channel(channel_id, IPC::Channel::MODE_SERVER, &dummy_listener); | 60 scoped_ptr<IPC::Channel> channel( |
61 ASSERT_TRUE(channel.Connect()); | 61 IPC::Channel::CreateServer(channel_id, &dummy_listener)); |
| 62 ASSERT_TRUE(channel->Connect()); |
62 | 63 |
63 scoped_ptr<MockRenderProcess> mock_process(new MockRenderProcess); | 64 scoped_ptr<MockRenderProcess> mock_process(new MockRenderProcess); |
64 // Owned by mock_process. | 65 // Owned by mock_process. |
65 RenderThreadImpl* thread = new RenderThreadImpl(channel_id); | 66 RenderThreadImpl* thread = new RenderThreadImpl(channel_id); |
66 thread->EnsureWebKitInitialized(); | 67 thread->EnsureWebKitInitialized(); |
67 | 68 |
68 ASSERT_TRUE(thread->input_handler_manager()); | 69 ASSERT_TRUE(thread->input_handler_manager()); |
69 | 70 |
70 thread->compositor_message_loop_proxy()->PostTask( | 71 thread->compositor_message_loop_proxy()->PostTask( |
71 FROM_HERE, | 72 FROM_HERE, |
72 base::Bind(&CheckRenderThreadInputHandlerManager, thread)); | 73 base::Bind(&CheckRenderThreadInputHandlerManager, thread)); |
73 } | 74 } |
74 | 75 |
75 } // namespace | 76 } // namespace |
76 } // namespace content | 77 } // namespace content |
OLD | NEW |