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

Unified 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: Responding to all comments 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/utility_process_mojo_client_impl.h
diff --git a/content/public/browser/utility_process_mojo_client_impl.h b/content/public/browser/utility_process_mojo_client_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..e58f67083de88c91b047045bfcc58a9f27e1e858
--- /dev/null
+++ b/content/public/browser/utility_process_mojo_client_impl.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_MOJO_CLIENT_IMPL_H_
+#define CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_MOJO_CLIENT_IMPL_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "base/strings/string16.h"
+#include "content/common/content_export.h"
+#include "mojo/public/cpp/system/message_pipe.h"
+
+namespace content {
+
+// Non-templated implementation of UtilityProcessMojoClient.
+class CONTENT_EXPORT UtilityProcessMojoClientImpl {
+ public:
+ explicit UtilityProcessMojoClientImpl(const base::string16& process_name);
+ ~UtilityProcessMojoClientImpl();
+
+ // Disables the sandbox in the utility process.
+ void set_disable_sandbox();
+
+ // Starts the utility process and connect to the remote Mojo service called
+ // |mojo_interface_name| using the |interface_pipe|.
+ void Start(const std::string& mojo_interface_name,
+ mojo::ScopedMessagePipeHandle interface_pipe);
+
+ private:
+ class Helper;
+
+ scoped_refptr<Helper> helper_;
+
+ DISALLOW_COPY_AND_ASSIGN(UtilityProcessMojoClientImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_UTILITY_PROCESS_MOJO_CLIENT_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698