blob: d9f69af6f9ea8b077ad4566c7c89cc7bcc4f5e99 [file] [log] [blame]
// Copyright 2015 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.
module content.mojom;
import "mojo/public/mojom/base/shared_memory.mojom";
interface TestService {
// Doesn't actually do anything, just responds.
DoSomething() => ();
// Terminates the current process to cause a connection error. Meant to test
// a connection error for the utility process.
DoTerminateProcess() => ();
// Crashes the current process. Meant to test that crash notifications are
// being sent correctly.
DoCrashImmediately() => ();
// Tries to create a temporary folder. Requires a sandbox to succeed.
CreateFolder() => (bool succeeded);
// Retrieve the requestor name as seen by the test app providing this service.
GetRequestorName() => (string name);
// Requests that a new read-only shared memory region be created and
// returned. On success, |region| is valid and its contents match |message|'s
// bytes exactly.
CreateReadOnlySharedMemoryRegion(string message)
=> (mojo_base.mojom.ReadOnlySharedMemoryRegion? region);
// Requests that a new writable shared memory region be created and
// returned. On success, |region| is valid and its contents match |message|'s
// bytes exactly.
CreateWritableSharedMemoryRegion(string message)
=> (mojo_base.mojom.WritableSharedMemoryRegion? region);
// Requests that a new unsafe shared memory region be created and returned.
// On success, |region| is valid and its contents match |message|'s bytes
// exactly.
CreateUnsafeSharedMemoryRegion(string message)
=> (mojo_base.mojom.UnsafeSharedMemoryRegion? region);
// Returns the result of sandbox::policy::Sandbox::IsProcessSandboxed().
IsProcessSandboxed() => (bool is_sandboxed);
};