OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // This file will be processed by the MIDL tool to |
| 6 // produce the type library (chrome_tab.tlb) and marshalling code. |
| 7 |
| 8 #include "olectl.h" |
| 9 import "oaidl.idl"; |
| 10 import "ocidl.idl"; |
| 11 |
| 12 [ |
| 13 object, |
| 14 uuid(B9F5EA20-C450-4f46-B70F-BFD3CA9A20C5), |
| 15 dual, |
| 16 nonextensible, |
| 17 helpstring("IChromeFrame Interface"), |
| 18 pointer_default(unique) |
| 19 ] |
| 20 interface IChromeFrame : IDispatch { |
| 21 [propget, id(1)] |
| 22 HRESULT src([out, retval] BSTR* src); |
| 23 [propput, id(1)] |
| 24 HRESULT src([in] BSTR src); |
| 25 |
| 26 [id(3)] |
| 27 HRESULT postMessage([in] BSTR message, [in, optional] VARIANT target); |
| 28 |
| 29 [id(4), propget] |
| 30 HRESULT onload([out, retval] VARIANT* onload_handler); |
| 31 [id(4), propput] |
| 32 HRESULT onload([in] VARIANT onload_handler); |
| 33 |
| 34 [propget, id(5)] |
| 35 HRESULT onloaderror([out, retval] VARIANT* onerror_handler); |
| 36 [propput, id(5)] |
| 37 HRESULT onloaderror([in] VARIANT onerror_handler); |
| 38 |
| 39 [propget, id(6)] |
| 40 HRESULT onmessage([out, retval] VARIANT* onmessage_handler); |
| 41 [propput, id(6)] |
| 42 HRESULT onmessage([in] VARIANT onmessage_handler); |
| 43 |
| 44 [propget, id(DISPID_READYSTATE)] |
| 45 HRESULT readyState([out, retval] long* ready_state); |
| 46 |
| 47 [id(7)] |
| 48 HRESULT addEventListener([in] BSTR event_type, [in] IDispatch* listener, |
| 49 [in, optional] VARIANT use_capture); |
| 50 |
| 51 [id(8)] |
| 52 HRESULT removeEventListener([in] BSTR event_type, [in] IDispatch* listener, |
| 53 [in, optional] VARIANT use_capture); |
| 54 |
| 55 [propget, id(9)] |
| 56 HRESULT version([out, retval] BSTR* version); |
| 57 |
| 58 [id(10), hidden] |
| 59 // This method is available only when the control is in privileged mode. |
| 60 HRESULT postPrivateMessage([in] BSTR message, |
| 61 [in] BSTR origin, |
| 62 [in] BSTR target); |
| 63 |
| 64 [propget, id(11)] |
| 65 HRESULT useChromeNetwork([out, retval] VARIANT_BOOL* pVal); |
| 66 [propput, id(11)] |
| 67 HRESULT useChromeNetwork([in] VARIANT_BOOL newVal); |
| 68 }; |
| 69 |
| 70 [ |
| 71 object, |
| 72 uuid(679E292F-DBAB-46b8-8693-03084CEF61BE), |
| 73 oleautomation, |
| 74 nonextensible, |
| 75 hidden, |
| 76 ] |
| 77 interface IChromeFramePrivileged: IUnknown { |
| 78 // If the host returns false for wants_privileged, the control |
| 79 // won't enable privileged mode. |
| 80 HRESULT GetWantsPrivileged([out] boolean *wants_privileged); |
| 81 // Extra arguments to supply to the Chrome instance. Returns S_FALSE when |
| 82 // no extra arguments are needed. Always sets the output string to non-NULL. |
| 83 HRESULT GetChromeExtraArguments([out] BSTR *args); |
| 84 // The profile name we want to use. |
| 85 HRESULT GetChromeProfileName([out] BSTR *profile_name); |
| 86 }; |
| 87 |
| 88 // Expose this service to the ChromeFrame control to trigger privileged |
| 89 // mode. If the control is in privileged mode, it will forward messages |
| 90 // to the onmessage handler irrespective of origin. |
| 91 cpp_quote("#define SID_ChromeFramePrivileged __uuidof(IChromeFramePrivileged)") |
| 92 |
| 93 typedef enum { |
| 94 CF_EVENT_DISPID_ONLOAD = 1, |
| 95 CF_EVENT_DISPID_ONLOADERROR, |
| 96 CF_EVENT_DISPID_ONMESSAGE, |
| 97 CF_EVENT_DISPID_ONPRIVATEMESSAGE, |
| 98 CF_EVENT_DISPID_ONREADYSTATECHANGED = DISPID_READYSTATECHANGE, |
| 99 } ChromeFrameEventDispId; |
| 100 |
| 101 [ |
| 102 uuid(6F2664E1-FF6E-488A-BCD1-F4CA6001DFCC), |
| 103 version(1.0), |
| 104 helpstring("ChromeTab 1.0 Type Library") |
| 105 ] |
| 106 library ChromeTabLib { |
| 107 importlib("stdole2.tlb"); |
| 108 |
| 109 [uuid(A96B8A02-DD11-4936-8C0F-B2520289FABB)] |
| 110 dispinterface DIChromeFrameEvents { |
| 111 properties: |
| 112 // None. |
| 113 |
| 114 methods: |
| 115 [id(CF_EVENT_DISPID_ONLOAD)] |
| 116 void onload(); |
| 117 [id(CF_EVENT_DISPID_ONLOADERROR)] |
| 118 void onloaderror(); |
| 119 [id(CF_EVENT_DISPID_ONMESSAGE)] |
| 120 void onmessage([in] IDispatch* event); |
| 121 [id(CF_EVENT_DISPID_ONREADYSTATECHANGED)] |
| 122 void onreadystatechanged(); |
| 123 [id(CF_EVENT_DISPID_ONPRIVATEMESSAGE)] |
| 124 // This event is only fired when the control is in privileged mode. |
| 125 void onprivatemessage([in] IDispatch* event, [in] BSTR target); |
| 126 }; |
| 127 |
| 128 [uuid(BB1176EE-20DD-41DC-9D1E-AC1335C7BBB0)] |
| 129 coclass HtmlFilter { |
| 130 [default] interface IUnknown; |
| 131 }; |
| 132 |
| 133 [uuid(9875BFAF-B04D-445E-8A69-BE36838CDE3E)] |
| 134 coclass ChromeProtocol { |
| 135 [default] interface IUnknown; |
| 136 }; |
| 137 |
| 138 [uuid(3E1D0E7F-F5E3-44CC-AA6A-C0A637619AB8), control] |
| 139 coclass ChromeActiveDocument { |
| 140 [default] interface IChromeFrame; |
| 141 }; |
| 142 |
| 143 [uuid(E0A900DF-9611-4446-86BD-4B1D47E7DB2A), control] |
| 144 coclass ChromeFrame { |
| 145 [default] interface IChromeFrame; |
| 146 [default, source] dispinterface DIChromeFrameEvents; |
| 147 }; |
| 148 |
| 149 [uuid(ECB3C477-1A0A-44bd-BB57-78F9EFE34FA7)] |
| 150 coclass ChromeFrameBHO { |
| 151 [default] interface IUnknown; |
| 152 }; |
| 153 }; |
OLD | NEW |