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 scoped_ptr<IPC::Channel> channel( | 60 IPC::Channel channel(channel_id, IPC::Channel::MODE_SERVER, &dummy_listener); |
61 IPC::Channel::CreateServer(channel_id, &dummy_listener)); | 61 ASSERT_TRUE(channel.Connect()); |
62 ASSERT_TRUE(channel->Connect()); | |
63 | 62 |
64 scoped_ptr<MockRenderProcess> mock_process(new MockRenderProcess); | 63 scoped_ptr<MockRenderProcess> mock_process(new MockRenderProcess); |
65 // Owned by mock_process. | 64 // Owned by mock_process. |
66 RenderThreadImpl* thread = new RenderThreadImpl(channel_id); | 65 RenderThreadImpl* thread = new RenderThreadImpl(channel_id); |
67 thread->EnsureWebKitInitialized(); | 66 thread->EnsureWebKitInitialized(); |
68 | 67 |
69 ASSERT_TRUE(thread->input_handler_manager()); | 68 ASSERT_TRUE(thread->input_handler_manager()); |
70 | 69 |
71 thread->compositor_message_loop_proxy()->PostTask( | 70 thread->compositor_message_loop_proxy()->PostTask( |
72 FROM_HERE, | 71 FROM_HERE, |
73 base::Bind(&CheckRenderThreadInputHandlerManager, thread)); | 72 base::Bind(&CheckRenderThreadInputHandlerManager, thread)); |
74 } | 73 } |
75 | 74 |
76 } // namespace | 75 } // namespace |
77 } // namespace content | 76 } // namespace content |
OLD | NEW |