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

Side by Side Diff: content/public/browser/utility_process_mojo_client_impl.h

Issue 2049303002: Add the UtilityProcessMojoClient class and convert SafeJsonParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
(Empty)
1 // Copyright 2016 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_PUBLIC_BROWSER_UTILITY_PROCESS_MOJO_CLIENT_IMPL_H_
6 #define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_MOJO_CLIENT_IMPL_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/strings/string16.h"
13 #include "base/threading/thread_checker.h"
14 #include "content/common/content_export.h"
15 #include "mojo/public/cpp/system/message_pipe.h"
16
17 namespace content {
18
19 // Non-templated implementation of UtilityProcessMojoClient.
20 class CONTENT_EXPORT UtilityProcessMojoClientImpl {
21 public:
22 explicit UtilityProcessMojoClientImpl(const base::string16& process_name);
23 ~UtilityProcessMojoClientImpl();
24
25 // Disables the sandbox in the utility process.
26 void set_disable_sandbox();
27
28 protected:
29 // Starts the utility process and connect to the remote Mojo service called
30 // |mojo_interface_name| using the |interface_pipe|.
31 void StartImpl(const std::string& mojo_interface_name,
32 mojo::ScopedMessagePipeHandle interface_pipe);
33
34 private:
35 class Holder;
Anand Mistry (off Chromium) 2016/06/10 11:13:55 I'm not a fan of the name Holder... but I don't ha
Patrick Monette 2016/06/10 18:13:24 I think Helper is a bit better.
36
37 scoped_refptr<Holder> holder_;
38
39 // Checks that this class is always accessed from the same thread.
40 base::ThreadChecker thread_checker_;
41
42 DISALLOW_COPY_AND_ASSIGN(UtilityProcessMojoClientImpl);
43 };
44
45 } // namespace content
46
47 #endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_MOJO_CLIENT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698