// Copyright 2018 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 chrome_cleaner.mojom; enum SpecialWindowsHandle { NULL_HANDLE, INVALID_HANDLE, CLASSES_ROOT, CURRENT_CONFIG, CURRENT_USER, LOCAL_MACHINE, USERS, }; // Mojo's |handle| type passes handles with DUPLICATE_CLOSE_SOURCE. The special // handles above can't be closed, so they can't be passed as |handle|. Use a // wrapper that puts these in |special_handle| and plain handles in // |raw_handle|. Typemapped to HANDLE. union WindowsHandle { handle raw_handle; SpecialWindowsHandle special_handle; }; interface TestWindowsHandle { EchoHandle(WindowsHandle in_WindowsHandle) => (WindowsHandle out_WindowsHandle); EchoRawHandle(handle in_handle) => (handle out_handle); };