// Copyright (c) 2010 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. // // @file // Interface and object declarations for CEEE IE user broker. import "exdisp.idl"; import "oaidl.idl"; import "ocidl.idl"; typedef long CeeeWindowHandle; [ object, uuid(A767CE3D-D65B-458f-B66A-CDB10B1F2DF6), nonextensible, helpstring("ICeeeBroker Interface"), pointer_default(unique), oleautomation ] // Can execute code in specific threads of other process, even at higher // integrity level than the calling process. // Allows the execution of code in destination threads. // This interface is DEPRECATED. interface ICeeeBroker : IUnknown { // Execute the requested message in the appropriate process/thread. // // @param function The JSON encoded function message to process. // @param response Where to return the JSON encoded response. HRESULT Execute([in] BSTR function, [out] BSTR* response); // Fire the given event message to Chrome Frame and potentially use it // to complete asynchronous extension API execution. // // @param event_name The name of the event to fire. // @param event_args The JSON encoded event arguments. HRESULT FireEvent([in] BSTR event_name, [in] BSTR event_args); } [ object, uuid(1821043a-a496-4d0e-9b50-1e0599237016), nonextensible, helpstring("ICeeeBrokerRegistrar Interface"), pointer_default(unique), oleautomation ] // Access to the broker registrar to un/register a CeeeExecutor or a // Chrome Frame Host running in an STA. interface ICeeeBrokerRegistrar : IUnknown { // Register the Window Executor @p executor to be used for the given // @p thread_id. // // @param thread_id The identifier of the thread where @p executor runs. // @param executor The executor to register. It must expose the // ICeeeWindowExecutor interface. HRESULT RegisterWindowExecutor([in] long thread_id, [in] IUnknown* executor); // TODO(mad@chromium.org): Implement the proper manual/secure // registration. Register a tab executor. This version bypasses the // checks to make sure the broker is the one which initiated the // registration. // // @param thread_id The identifier of the thread where @p executor runs. // @param executor The executor to register. It must expose the // ICeeeTabExecutor interface. HRESULT RegisterTabExecutor([in] long thread_id, [in] IUnknown* executor); // Unregister @p executor for the given @p thread_id. // // @param thread_id The identifier of the thread for which we want to // unregister the executor of. HRESULT UnregisterExecutor([in] long thread_id); // TODO(hansl@google.com): Remove this and implement it in // RegisterTabExecutor. Make sure the Tab isn't registered before a TabId // is available. // Link a tab_id with a related BHO handle. There is a strict one to one // relation between tab_ids and handles. // // @param tab_id The Chrome TabId related to the tab. // @param handle The HWND of the BHO for this TabId. HRESULT SetTabIdForHandle([in] long tab_id, [in] CeeeWindowHandle handle); }; [ uuid(45B783D0-8040-49a6-A719-84E320AAB3C5), version(1.0), helpstring("CEEE Broker 1.0 Type Library") ] library CeeeBrokerLib { interface ICeeeBrokerRegistrar; interface ICeeePostman; [ uuid(6D88A70D-2218-4466-BBD6-87AB563811A2), helpstring("CEEE Broker Class") ] coclass CeeeBroker { [default] interface ICeeeBroker; }; };