Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file will be processed by the MIDL tool to | 5 // This file will be processed by the MIDL tool to |
| 6 // produce the type library (chrome_tab.tlb) and marshalling code. | 6 // produce the type library (chrome_tab.tlb) and marshalling code. |
| 7 | 7 |
| 8 #include "olectl.h" | 8 #include "olectl.h" |
| 9 import "oaidl.idl"; | 9 import "oaidl.idl"; |
| 10 import "ocidl.idl"; | 10 import "ocidl.idl"; |
| 11 | 11 |
| 12 [ | 12 [ |
| 13 object, | 13 object, |
| 14 uuid(FB243E4B-8AC2-4840-95F2-91B9AF9CFF10), | 14 uuid(25248626-A306-4857-A13C-4AD84FF15E10), |
|
amit
2011/04/05 18:00:24
Tommi pointed out that any existing users embeddin
Jói
2011/04/05 18:47:10
OK, will address this and upload a new version soo
amit
2011/04/05 18:50:17
Yes, that's perfect. Also, please double check tha
Jói
2011/04/05 19:24:45
I reverted the IID change here and on the dispinte
| |
| 15 dual, | 15 dual, |
| 16 nonextensible, | 16 nonextensible, |
| 17 helpstring("IChromeFrame Interface"), | 17 helpstring("IChromeFrame Interface"), |
| 18 pointer_default(unique) | 18 pointer_default(unique) |
| 19 ] | 19 ] |
| 20 interface IChromeFrame : IDispatch { | 20 interface IChromeFrame : IDispatch { |
| 21 [propget, id(1)] | 21 [propget, id(1)] |
| 22 HRESULT src([out, retval] BSTR* src); | 22 HRESULT src([out, retval] BSTR* src); |
| 23 [propput, id(1)] | 23 [propput, id(1)] |
| 24 HRESULT src([in] BSTR src); | 24 HRESULT src([in] BSTR src); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 // This method is available only when the control is in privileged mode. | 59 // This method is available only when the control is in privileged mode. |
| 60 HRESULT postPrivateMessage([in] BSTR message, | 60 HRESULT postPrivateMessage([in] BSTR message, |
| 61 [in] BSTR origin, | 61 [in] BSTR origin, |
| 62 [in] BSTR target); | 62 [in] BSTR target); |
| 63 | 63 |
| 64 [propget, id(11)] | 64 [propget, id(11)] |
| 65 HRESULT useChromeNetwork([out, retval] VARIANT_BOOL* pVal); | 65 HRESULT useChromeNetwork([out, retval] VARIANT_BOOL* pVal); |
| 66 [propput, id(11)] | 66 [propput, id(11)] |
| 67 HRESULT useChromeNetwork([in] VARIANT_BOOL newVal); | 67 HRESULT useChromeNetwork([in] VARIANT_BOOL newVal); |
| 68 | 68 |
| 69 [id(12), hidden] | |
| 70 // This method is available only when the control is in privileged mode. | |
| 71 HRESULT installExtension([in] BSTR crx_path); | |
| 72 | |
| 73 [id(13), hidden] | |
| 74 // This method is available only when the control is in privileged mode. | |
| 75 HRESULT loadExtension([in] BSTR extension_path); | |
| 76 | |
| 77 [id(14), hidden] | |
| 78 // This method is available only when the control is in privileged mode. | |
| 79 HRESULT getEnabledExtensions(); | |
| 80 | |
| 81 [id(15)] | 69 [id(15)] |
| 82 // This method bootstraps the BHO if it is not already loaded. | 70 // This method bootstraps the BHO if it is not already loaded. |
| 83 HRESULT registerBhoIfNeeded(); | 71 HRESULT registerBhoIfNeeded(); |
| 84 }; | 72 }; |
| 85 | 73 |
| 86 [ | 74 [ |
| 87 object, | 75 object, |
| 88 uuid(851bedec-4b2c-4959-abc0-a53403117257), | 76 uuid(E98FDFD9-312B-444a-A640-8E88F3CC08B8), |
| 89 local, // This interface should never be marshaled. | |
| 90 hidden, | |
| 91 ] | |
| 92 // Internal implementation interface. Not intended as an API. May change | |
| 93 // frequently, don't treat this as frozen. | |
| 94 interface IChromeFrameInternal : IUnknown { | |
| 95 // This method is available only when the control is in privileged mode. | |
| 96 HRESULT getSessionId([out, retval] int* session_id); | |
| 97 }; | |
| 98 | |
| 99 [ | |
| 100 object, | |
| 101 uuid(B1B52A4D-B22E-489f-8CCD-1CF9166FA90E), | |
| 102 oleautomation, | 77 oleautomation, |
| 103 nonextensible, | 78 nonextensible, |
| 104 hidden, | 79 hidden, |
| 105 ] | 80 ] |
| 106 // Internal implementation interface. Not intended as an API. May change | 81 // Internal implementation interface. Not intended as an API. May change |
| 107 // frequently, don't treat this as frozen. | 82 // frequently, don't treat this as frozen. |
| 108 interface IChromeFramePrivileged : IUnknown { | 83 interface IChromeFramePrivileged : IUnknown { |
| 109 // If the host returns false for wants_privileged, the control | 84 // If the host returns false for wants_privileged, the control |
| 110 // won't enable privileged mode. | 85 // won't enable privileged mode. |
| 111 HRESULT GetWantsPrivileged([out] boolean *wants_privileged); | 86 HRESULT GetWantsPrivileged([out] boolean *wants_privileged); |
| 112 // The profile name we want to use. | 87 // The profile name we want to use. |
| 113 HRESULT GetChromeProfileName([out] BSTR *profile_name); | 88 HRESULT GetChromeProfileName([out] BSTR *profile_name); |
| 114 // The comma-separated list of extension API functions you wish to automate. | |
| 115 // Return S_FALSE to leave the default, which is to not automate any | |
| 116 // functions. | |
| 117 HRESULT GetExtensionApisToAutomate([out] BSTR *extension_apis); | |
| 118 // Called when an automation version mismatch occurs. Returns S_OK if | 89 // Called when an automation version mismatch occurs. Returns S_OK if |
| 119 // a dialog should be showed to the user by this CF instance, S_FALSE if | 90 // a dialog should be showed to the user by this CF instance, S_FALSE if |
| 120 // not. | 91 // not. |
| 121 HRESULT ShouldShowVersionMismatchDialog(); | 92 HRESULT ShouldShowVersionMismatchDialog(); |
| 122 }; | 93 }; |
| 123 | 94 |
| 124 // Expose this service to the ChromeFrame control to trigger privileged | 95 // Expose this service to the ChromeFrame control to trigger privileged |
| 125 // mode. If the control is in privileged mode, it will forward messages | 96 // mode. If the control is in privileged mode, it will forward messages |
| 126 // to the onmessage handler irrespective of origin. | 97 // to the onmessage handler irrespective of origin. |
| 127 cpp_quote("#define SID_ChromeFramePrivileged __uuidof(IChromeFramePrivileged)") | 98 cpp_quote("#define SID_ChromeFramePrivileged __uuidof(IChromeFramePrivileged)") |
| 128 | 99 |
| 129 typedef enum { | 100 typedef enum { |
| 130 CF_EVENT_DISPID_ONLOAD = 1, | 101 CF_EVENT_DISPID_ONLOAD = 1, |
| 131 CF_EVENT_DISPID_ONLOADERROR, | 102 CF_EVENT_DISPID_ONLOADERROR, |
| 132 CF_EVENT_DISPID_ONMESSAGE, | 103 CF_EVENT_DISPID_ONMESSAGE, |
| 133 CF_EVENT_DISPID_ONPRIVATEMESSAGE, | 104 CF_EVENT_DISPID_ONPRIVATEMESSAGE, |
| 134 CF_EVENT_DISPID_ONEXTENSIONREADY, | |
| 135 CF_EVENT_DISPID_ONGETENABLEDEXTENSIONSCOMPLETE, | |
| 136 CF_EVENT_DISPID_ONCHANNELERROR, | 105 CF_EVENT_DISPID_ONCHANNELERROR, |
| 137 CF_EVENT_DISPID_ONCLOSE, | 106 CF_EVENT_DISPID_ONCLOSE, |
| 138 CF_EVENT_DISPID_ONREADYSTATECHANGED = DISPID_READYSTATECHANGE, | 107 CF_EVENT_DISPID_ONREADYSTATECHANGED = DISPID_READYSTATECHANGE, |
| 139 } ChromeFrameEventDispId; | 108 } ChromeFrameEventDispId; |
| 140 | 109 |
| 141 [ | 110 [ |
| 142 uuid(6F2664E1-FF6E-488A-BCD1-F4CA6001DFCC), | 111 uuid(6F2664E1-FF6E-488A-BCD1-F4CA6001DFCC), |
| 143 version(1.0), | 112 version(1.0), |
| 144 helpstring("ChromeTab 1.0 Type Library") | 113 helpstring("ChromeTab 1.0 Type Library") |
| 145 ] | 114 ] |
| 146 library ChromeTabLib { | 115 library ChromeTabLib { |
| 147 importlib("stdole2.tlb"); | 116 importlib("stdole2.tlb"); |
| 148 | 117 |
| 149 [uuid(388B5D64-CE67-415b-9B0F-745C56E868E7)] | 118 [uuid(812C601D-D787-49f2-BF05-6A460B44D2B3)] |
|
Sigurður Ásgeirsson
2011/04/05 16:57:16
I don't think this is necessary. As the interface
Jói
2011/04/05 17:04:17
Yeah, I didn't think so either. Just going by the
Jói
2011/04/05 19:24:45
To be on the safe side (to leave the type library
| |
| 150 dispinterface DIChromeFrameEvents { | 119 dispinterface DIChromeFrameEvents { |
| 151 properties: | 120 properties: |
| 152 // None. | 121 // None. |
| 153 | 122 |
| 154 methods: | 123 methods: |
| 155 [id(CF_EVENT_DISPID_ONLOAD)] | 124 [id(CF_EVENT_DISPID_ONLOAD)] |
| 156 void onload(); | 125 void onload(); |
| 157 | 126 |
| 158 [id(CF_EVENT_DISPID_ONLOADERROR)] | 127 [id(CF_EVENT_DISPID_ONLOADERROR)] |
| 159 void onloaderror(); | 128 void onloaderror(); |
| 160 | 129 |
| 161 [id(CF_EVENT_DISPID_ONMESSAGE)] | 130 [id(CF_EVENT_DISPID_ONMESSAGE)] |
| 162 void onmessage([in] IDispatch* event); | 131 void onmessage([in] IDispatch* event); |
| 163 | 132 |
| 164 [id(CF_EVENT_DISPID_ONREADYSTATECHANGED)] | 133 [id(CF_EVENT_DISPID_ONREADYSTATECHANGED)] |
| 165 void onreadystatechanged(); | 134 void onreadystatechanged(); |
| 166 | 135 |
| 167 [id(CF_EVENT_DISPID_ONPRIVATEMESSAGE)] | 136 [id(CF_EVENT_DISPID_ONPRIVATEMESSAGE)] |
| 168 // This event is only fired when the control is in privileged mode. | 137 // This event is only fired when the control is in privileged mode. |
| 169 void onprivatemessage([in] IDispatch* event, [in] BSTR target); | 138 void onprivatemessage([in] IDispatch* event, [in] BSTR target); |
| 170 | 139 |
| 171 [id(CF_EVENT_DISPID_ONEXTENSIONREADY)] | |
| 172 // This event is only fired when the control is in privileged mode. | |
| 173 // response is one of AutomationMsg_ExtensionResponseValues. | |
| 174 void onextensionready([in] BSTR path, [in] long response); | |
| 175 | |
| 176 [id(CF_EVENT_DISPID_ONGETENABLEDEXTENSIONSCOMPLETE)] | |
| 177 // This event is only fired when the control is in privileged mode. | |
| 178 // extension_paths is an array of BSTRs of the base directories of | |
| 179 // enabled extensions. | |
| 180 void ongetenabledextensionscomplete([in] SAFEARRAY(BSTR) extension_paths); | |
| 181 | |
| 182 [id(CF_EVENT_DISPID_ONCHANNELERROR)] | 140 [id(CF_EVENT_DISPID_ONCHANNELERROR)] |
| 183 // This event is fired when there is an error in communication channel with | 141 // This event is fired when there is an error in communication channel with |
| 184 // Chrome and Automation must be reconnected to continue. | 142 // Chrome and Automation must be reconnected to continue. |
| 185 void onchannelerror(); | 143 void onchannelerror(); |
| 186 | 144 |
| 187 [id(CF_EVENT_DISPID_ONCLOSE)] | 145 [id(CF_EVENT_DISPID_ONCLOSE)] |
| 188 // This event is fired when the script inside the page wants to close it. | 146 // This event is fired when the script inside the page wants to close it. |
| 189 // This is just a notification, there is no way to prevent the script from | 147 // This is just a notification, there is no way to prevent the script from |
| 190 // closing. | 148 // closing. |
| 191 void onclose(); | 149 void onclose(); |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 210 coclass ChromeFrame { | 168 coclass ChromeFrame { |
| 211 [default] interface IChromeFrame; | 169 [default] interface IChromeFrame; |
| 212 [default, source] dispinterface DIChromeFrameEvents; | 170 [default, source] dispinterface DIChromeFrameEvents; |
| 213 }; | 171 }; |
| 214 | 172 |
| 215 [uuid(ECB3C477-1A0A-44bd-BB57-78F9EFE34FA7)] | 173 [uuid(ECB3C477-1A0A-44bd-BB57-78F9EFE34FA7)] |
| 216 coclass ChromeFrameBHO { | 174 coclass ChromeFrameBHO { |
| 217 [default] interface IUnknown; | 175 [default] interface IUnknown; |
| 218 }; | 176 }; |
| 219 }; | 177 }; |
| OLD | NEW |