From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../python/gyp/test/win/idl-rules/Window.idl | 9 +++ .../python/gyp/test/win/idl-rules/basic-idl.gyp | 67 ++++++++++++++++++++++ .../gyp/test/win/idl-rules/history_indexer.idl | 17 ++++++ .../gyp/test/win/idl-rules/history_indexer_user.cc | 15 +++++ .../python/gyp/test/win/idl-rules/idl_compiler.py | 17 ++++++ 5 files changed, 125 insertions(+) create mode 100644 third_party/python/gyp/test/win/idl-rules/Window.idl create mode 100644 third_party/python/gyp/test/win/idl-rules/basic-idl.gyp create mode 100644 third_party/python/gyp/test/win/idl-rules/history_indexer.idl create mode 100644 third_party/python/gyp/test/win/idl-rules/history_indexer_user.cc create mode 100644 third_party/python/gyp/test/win/idl-rules/idl_compiler.py (limited to 'third_party/python/gyp/test/win/idl-rules') diff --git a/third_party/python/gyp/test/win/idl-rules/Window.idl b/third_party/python/gyp/test/win/idl-rules/Window.idl new file mode 100644 index 0000000000..d8ea01bee3 --- /dev/null +++ b/third_party/python/gyp/test/win/idl-rules/Window.idl @@ -0,0 +1,9 @@ +// Copyright (c) 2014 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +[ + WillBeGarbageCollected, +] interface Window { + void alert(); +}; diff --git a/third_party/python/gyp/test/win/idl-rules/basic-idl.gyp b/third_party/python/gyp/test/win/idl-rules/basic-idl.gyp new file mode 100644 index 0000000000..b74622adea --- /dev/null +++ b/third_party/python/gyp/test/win/idl-rules/basic-idl.gyp @@ -0,0 +1,67 @@ +# Copyright (c) 2012 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. + +{ + 'variables': { + 'midl_out_dir': '<(SHARED_INTERMEDIATE_DIR)', + }, + 'target_defaults': { + 'configurations': { + 'Debug': { + 'msvs_configuration_platform': 'Win32', + }, + 'Debug_x64': { + 'inherit_from': ['Debug'], + 'msvs_configuration_platform': 'x64', + }, + }, + }, + 'targets': [ + { + 'target_name': 'idl_test', + 'type': 'executable', + 'sources': [ + 'history_indexer.idl', + '<(midl_out_dir)/history_indexer.h', + '<(midl_out_dir)/history_indexer_i.c', + 'history_indexer_user.cc', + ], + 'libraries': ['ole32.lib'], + 'include_dirs': [ + '<(midl_out_dir)', + ], + 'msvs_settings': { + 'VCMIDLTool': { + 'OutputDirectory': '<(midl_out_dir)', + 'HeaderFileName': '<(RULE_INPUT_ROOT).h', + }, + }, + }, + { + 'target_name': 'idl_explicit_action', + 'type': 'none', + 'sources': [ + 'Window.idl', + ], + 'actions': [{ + 'action_name': 'blink_idl', + 'explicit_idl_action': 1, + 'msvs_cygwin_shell': 0, + 'inputs': [ + 'Window.idl', + 'idl_compiler.py', + ], + 'outputs': [ + 'Window.cpp', + 'Window.h', + ], + 'action': [ + 'python', + 'idl_compiler.py', + 'Window.idl', + ], + }], + }, + ], +} diff --git a/third_party/python/gyp/test/win/idl-rules/history_indexer.idl b/third_party/python/gyp/test/win/idl-rules/history_indexer.idl new file mode 100644 index 0000000000..e866ce6d90 --- /dev/null +++ b/third_party/python/gyp/test/win/idl-rules/history_indexer.idl @@ -0,0 +1,17 @@ +// Copyright (c) 2012 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. + +import "oaidl.idl"; +import "ocidl.idl"; + +[ + object, + uuid(9C1100DD-51D4-4827-AE9F-3B8FAC4AED72), + oleautomation, + nonextensible, + pointer_default(unique) +] +interface IChromeHistoryIndexer : IUnknown { + HRESULT SomeFunction([in] VARIANT begin_time, [in] VARIANT end_time); +}; diff --git a/third_party/python/gyp/test/win/idl-rules/history_indexer_user.cc b/third_party/python/gyp/test/win/idl-rules/history_indexer_user.cc new file mode 100644 index 0000000000..071a9ffef5 --- /dev/null +++ b/third_party/python/gyp/test/win/idl-rules/history_indexer_user.cc @@ -0,0 +1,15 @@ +// Copyright (c) 2012 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "history_indexer.h" + +// Use the thing in the IDL. +int main() { + IChromeHistoryIndexer** indexer = 0; + IID fake_iid; + CoCreateInstance(fake_iid, NULL, CLSCTX_INPROC, + __uuidof(IChromeHistoryIndexer), + reinterpret_cast(indexer)); + return 0; +} diff --git a/third_party/python/gyp/test/win/idl-rules/idl_compiler.py b/third_party/python/gyp/test/win/idl-rules/idl_compiler.py new file mode 100644 index 0000000000..a12b274d67 --- /dev/null +++ b/third_party/python/gyp/test/win/idl-rules/idl_compiler.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +# Copyright (c) 2014 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# mock, just outputs empty .h/.cpp files + +import os +import sys + +if len(sys.argv) == 2: + basename, ext = os.path.splitext(sys.argv[1]) + with open('%s.h' % basename, 'w') as f: + f.write('// %s.h\n' % basename) + with open('%s.cpp' % basename, 'w') as f: + f.write('// %s.cpp\n' % basename) -- cgit v1.2.3