Chromoting: Fix newly-added JS compile warning.
[chromium-blink-merge.git] / chrome_frame / chrome_tab.idl
blob4d11ea4a2e9b0c99b2b0f899316060b931933113
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.
5 // This file will be processed by the MIDL tool to
6 // produce the type library (chrome_tab.tlb) and marshalling code.
8 #include "olectl.h"
9 import "oaidl.idl";
10 import "ocidl.idl";
13 object,
14 uuid(FB243E4B-8AC2-4840-95F2-91B9AF9CFF10),
15 dual,
16 nonextensible,
17 helpstring("IChromeFrame Interface"),
18 pointer_default(unique)
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);
26 [id(3)]
27 HRESULT postMessage([in] BSTR message, [in, optional] VARIANT target);
29 [id(4), propget]
30 HRESULT onload([out, retval] VARIANT* onload_handler);
31 [id(4), propput]
32 HRESULT onload([in] VARIANT onload_handler);
34 [propget, id(5)]
35 HRESULT onloaderror([out, retval] VARIANT* onerror_handler);
36 [propput, id(5)]
37 HRESULT onloaderror([in] VARIANT onerror_handler);
39 [propget, id(6)]
40 HRESULT onmessage([out, retval] VARIANT* onmessage_handler);
41 [propput, id(6)]
42 HRESULT onmessage([in] VARIANT onmessage_handler);
44 [propget, id(DISPID_READYSTATE)]
45 HRESULT readyState([out, retval] long* ready_state);
47 [id(7)]
48 HRESULT addEventListener([in] BSTR event_type, [in] IDispatch* listener,
49 [in, optional] VARIANT use_capture);
51 [id(8)]
52 HRESULT removeEventListener([in] BSTR event_type, [in] IDispatch* listener,
53 [in, optional] VARIANT use_capture);
55 [propget, id(9)]
56 HRESULT version([out, retval] BSTR* version);
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);
64 [propget, id(11)]
65 HRESULT useChromeNetwork([out, retval] VARIANT_BOOL* pVal);
66 [propput, id(11)]
67 HRESULT useChromeNetwork([in] VARIANT_BOOL newVal);
69 [id(12), hidden]
70 // Deprecated. Returns E_NOTIMPL.
71 HRESULT installExtension([in] BSTR crx_path);
73 [id(13), hidden]
74 // Deprecated. Returns E_NOTIMPL.
75 HRESULT loadExtension([in] BSTR extension_path);
77 [id(14), hidden]
78 // Deprecated. Returns E_NOTIMPL.
79 HRESULT getEnabledExtensions();
81 [id(15)]
82 // This method bootstraps the BHO if it is not already loaded.
83 HRESULT registerBhoIfNeeded();
87 object,
88 uuid(E98FDFD9-312B-444a-A640-8E88F3CC08B8),
89 oleautomation,
90 nonextensible,
91 hidden,
93 // Internal implementation interface. Not intended as an API. May change
94 // frequently, don't treat this as frozen.
95 interface IChromeFramePrivileged : IUnknown {
96 // If the host returns false for wants_privileged, the control
97 // won't enable privileged mode.
98 HRESULT GetWantsPrivileged([out] boolean *wants_privileged);
99 // The profile name we want to use.
100 HRESULT GetChromeProfileName([out] BSTR *profile_name);
101 // Called when an automation version mismatch occurs. Returns S_OK if
102 // a dialog should be showed to the user by this CF instance, S_FALSE if
103 // not.
104 HRESULT ShouldShowVersionMismatchDialog();
107 // Expose this service to the ChromeFrame control to trigger privileged
108 // mode. If the control is in privileged mode, it will forward messages
109 // to the onmessage handler irrespective of origin.
110 cpp_quote("#define SID_ChromeFramePrivileged __uuidof(IChromeFramePrivileged)")
112 typedef enum {
113 CF_EVENT_DISPID_ONLOAD = 1,
114 CF_EVENT_DISPID_ONLOADERROR,
115 CF_EVENT_DISPID_ONMESSAGE,
116 CF_EVENT_DISPID_ONPRIVATEMESSAGE,
117 CF_EVENT_DISPID_ONCHANNELERROR,
118 CF_EVENT_DISPID_ONCLOSE,
119 CF_EVENT_DISPID_ONREADYSTATECHANGED = DISPID_READYSTATECHANGE,
120 } ChromeFrameEventDispId;
123 uuid(6F2664E1-FF6E-488A-BCD1-F4CA6001DFCC),
124 version(1.0),
125 helpstring("ChromeTab 1.0 Type Library")
127 library ChromeTabLib {
128 importlib("stdole2.tlb");
130 [uuid(388B5D64-CE67-415b-9B0F-745C56E868E7)]
131 dispinterface DIChromeFrameEvents {
132 properties:
133 // None.
135 methods:
136 [id(CF_EVENT_DISPID_ONLOAD)]
137 void onload();
139 [id(CF_EVENT_DISPID_ONLOADERROR)]
140 void onloaderror();
142 [id(CF_EVENT_DISPID_ONMESSAGE)]
143 void onmessage([in] IDispatch* event);
145 [id(CF_EVENT_DISPID_ONREADYSTATECHANGED)]
146 void onreadystatechanged();
148 [id(CF_EVENT_DISPID_ONPRIVATEMESSAGE)]
149 // This event is only fired when the control is in privileged mode.
150 void onprivatemessage([in] IDispatch* event, [in] BSTR target);
152 [id(CF_EVENT_DISPID_ONCHANNELERROR)]
153 // This event is fired when there is an error in communication channel with
154 // Chrome and Automation must be reconnected to continue.
155 void onchannelerror();
157 [id(CF_EVENT_DISPID_ONCLOSE)]
158 // This event is fired when the script inside the page wants to close it.
159 // This is just a notification, there is no way to prevent the script from
160 // closing.
161 void onclose();
164 [uuid(BB1176EE-20DD-41DC-9D1E-AC1335C7BBB0)]
165 coclass HtmlFilter {
166 [default] interface IUnknown;
169 [uuid(9875BFAF-B04D-445E-8A69-BE36838CDE3E)]
170 coclass ChromeProtocol {
171 [default] interface IUnknown;
174 [uuid(3E1D0E7F-F5E3-44CC-AA6A-C0A637619AB8), control]
175 coclass ChromeActiveDocument {
176 [default] interface IChromeFrame;
179 [uuid(E0A900DF-9611-4446-86BD-4B1D47E7DB2A), control]
180 coclass ChromeFrame {
181 [default] interface IChromeFrame;
182 [default, source] dispinterface DIChromeFrameEvents;
185 [uuid(ECB3C477-1A0A-44bd-BB57-78F9EFE34FA7)]
186 coclass ChromeFrameBHO {
187 [default] interface IUnknown;