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

Side by Side Diff: content/common/in_process_child_thread_params.h

Issue 2389193004: Always use ChannelMojo for content child processes. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ 5 #ifndef CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_
6 #define CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ 6 #define CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/sequenced_task_runner.h" 11 #include "base/sequenced_task_runner.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 // Tells ChildThreadImpl to run in in-process mode. There are a couple of 16 // Tells ChildThreadImpl to run in in-process mode. There are a couple of
17 // parameters to run in the mode: An emulated io task runner used by 17 // parameters to run in the mode: An emulated io task runner used by
18 // ChnanelMojo, an IPC channel name to open. 18 // ChnanelMojo, an IPC channel name to open.
19 class CONTENT_EXPORT InProcessChildThreadParams { 19 class CONTENT_EXPORT InProcessChildThreadParams {
20 public: 20 public:
21 InProcessChildThreadParams( 21 InProcessChildThreadParams(scoped_refptr<base::SequencedTaskRunner> io_runner,
22 const std::string& channel_name, 22 const std::string& application_token);
23 scoped_refptr<base::SequencedTaskRunner> io_runner,
24 const std::string& application_token = std::string());
25 InProcessChildThreadParams(const InProcessChildThreadParams& other); 23 InProcessChildThreadParams(const InProcessChildThreadParams& other);
26 ~InProcessChildThreadParams(); 24 ~InProcessChildThreadParams();
27 25
28 const std::string& channel_name() const { return channel_name_; }
29 scoped_refptr<base::SequencedTaskRunner> io_runner() const { 26 scoped_refptr<base::SequencedTaskRunner> io_runner() const {
30 return io_runner_; 27 return io_runner_;
31 } 28 }
32 const std::string& application_token() const { 29 const std::string& application_token() const {
33 return application_token_; 30 return application_token_;
34 } 31 }
35 32
36 private: 33 private:
37 std::string channel_name_;
38 scoped_refptr<base::SequencedTaskRunner> io_runner_; 34 scoped_refptr<base::SequencedTaskRunner> io_runner_;
39 std::string application_token_; 35 std::string application_token_;
40 }; 36 };
41 37
42 } // namespace content 38 } // namespace content
43 39
44 #endif // CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_ 40 #endif // CONTENT_COMMON_IN_PROCESS_CHILD_THREAD_PARAMS_H_
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.cc ('k') | content/common/in_process_child_thread_params.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698