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

Side by Side Diff: content/test/render_thread_impl_browser_test_ipc_helper.h

Issue 2226403002: Remove Channel token from InProcessChildThreadParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moar-channels
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « content/test/BUILD.gn ('k') | content/test/render_thread_impl_browser_test_ipc_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_TEST_RENDER_THREAD_IMPL_BROWSER_TEST_IPC_HELPER_H_
6 #define CONTENT_TEST_RENDER_THREAD_IMPL_BROWSER_TEST_IPC_HELPER_H_
7
8 #include "content/app/mojo/mojo_init.h"
9 #include "ipc/ipc_channel_mojo.h"
10 #include "ipc/ipc_channel_proxy.h"
11 #include "mojo/edk/test/scoped_ipc_support.h"
12
13 namespace IPC {
14 class ChannelProxy;
15 class Sender;
16 };
17
18 namespace content {
19
20 // Helper for RenderThreadImplBrowserTest which takes care of setting up an IPC
21 // server, capable of sending messages to the RenderThread.
22 class RenderThreadImplBrowserIPCTestHelper {
23 public:
24 RenderThreadImplBrowserIPCTestHelper();
25 ~RenderThreadImplBrowserIPCTestHelper();
26
27 IPC::Sender* Sender() const { return channel_.get(); }
28
29 base::MessageLoop* GetMessageLoop() const { return message_loop_.get(); }
30
31 const std::string& GetChannelId() const { return channel_id_; }
32
33 scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() const;
34
35 const std::string& GetMojoIpcToken() const {
36 return mojo_ipc_token_;
37 }
38
39 const std::string& GetMojoApplicationToken() const {
40 return mojo_application_token_;
41 }
42
43 private:
44 class DummyListener;
45
46 void SetupIpcThread();
47 void SetupMojo();
48
49 std::unique_ptr<IPC::ChannelProxy> channel_;
50 std::unique_ptr<base::Thread> ipc_thread_;
51 std::unique_ptr<base::MessageLoopForIO> message_loop_;
52 std::unique_ptr<DummyListener> dummy_listener_;
53 std::unique_ptr<mojo::edk::test::ScopedIPCSupport> ipc_support_;
54 std::string mojo_ipc_token_;
55 std::string mojo_application_token_;
56 std::string channel_id_;
57 };
58
59 } // namespace content
60
61 #endif // CONTENT_TEST_RENDER_THREAD_IMPL_BROWSER_TEST_IPC_HELPER_H_
OLDNEW
« no previous file with comments | « content/test/BUILD.gn ('k') | content/test/render_thread_impl_browser_test_ipc_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698