Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Side by Side Diff: content/renderer/render_thread_impl_browsertest.cc

Issue 307653003: Introduce IPC::Channel::Create*() to ensure it being heap-allocated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows build, landing again. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/child_process_host_impl.cc ('k') | ipc/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.cc ('k') | ipc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698