summaryrefslogtreecommitdiff
path: root/chromium/base/fuchsia/process_context.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/fuchsia/process_context.h')
-rw-r--r--chromium/base/fuchsia/process_context.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/chromium/base/fuchsia/process_context.h b/chromium/base/fuchsia/process_context.h
new file mode 100644
index 00000000000..7808eacd08d
--- /dev/null
+++ b/chromium/base/fuchsia/process_context.h
@@ -0,0 +1,35 @@
+// Copyright 2020 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 BASE_FUCHSIA_PROCESS_CONTEXT_H_
+#define BASE_FUCHSIA_PROCESS_CONTEXT_H_
+
+#include <memory>
+
+#include "base/base_export.h"
+
+namespace sys {
+class ComponentContext;
+class ComponentInspector;
+} // namespace sys
+
+namespace base {
+
+// Returns sys::ComponentInspector for the current process.
+BASE_EXPORT sys::ComponentInspector* ComponentInspectorForProcess();
+
+// Returns default sys::ComponentContext for the current process.
+BASE_EXPORT sys::ComponentContext* ComponentContextForProcess();
+
+// Replaces the default sys::ComponentContext for the current process, and
+// returns the previously-active one.
+// Use the base::TestComponentContextForProcess rather than calling this
+// directly.
+BASE_EXPORT std::unique_ptr<sys::ComponentContext>
+ReplaceComponentContextForProcessForTest(
+ std::unique_ptr<sys::ComponentContext> context);
+
+} // namespace base
+
+#endif // BASE_FUCHSIA_PROCESS_CONTEXT_H_