1 // Copyright (c) 2011 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 #ifndef CHROME_FRAME_HTML_WINDOW_IMPL_H_ 6 #define CHROME_FRAME_HTML_WINDOW_IMPL_H_ 7 8 #include <atlbase.h> 9 #include <atlcom.h> 10 #include <mshtml.h> 11 12 #include "chrome_frame/chrome_tab.h" 13 #include "chrome_frame/resource.h" 14 #include "grit/chrome_frame_resources.h" 15 16 template <typename T> 17 class ATL_NO_VTABLE HTMLWindowImpl 18 : public IDispatchImpl<T> { 19 public: HTMLWindowImpl()20 HTMLWindowImpl() {} 21 22 // IHTMLFramesCollection2 STDMETHOD(item)23 STDMETHOD(item)(VARIANT* index, VARIANT* result) { 24 DLOG(INFO) << __FUNCTION__; 25 return E_NOTIMPL; 26 } 27 STDMETHOD(get_length)28 STDMETHOD(get_length)(long* length) { 29 DLOG(INFO) << __FUNCTION__; 30 if (!length) 31 return E_POINTER; 32 33 *length = 0; 34 return S_OK; 35 } 36 37 // IHTMLWindow2 STDMETHOD(get_frames)38 STDMETHOD(get_frames)(IHTMLFramesCollection2** collection) { 39 DLOG(INFO) << __FUNCTION__; 40 return E_NOTIMPL; 41 } 42 STDMETHOD(put_defaultStatus)43 STDMETHOD(put_defaultStatus)(BSTR status) { 44 DLOG(INFO) << __FUNCTION__; 45 return E_NOTIMPL; 46 } 47 STDMETHOD(get_defaultStatus)48 STDMETHOD(get_defaultStatus)(BSTR* status) { 49 DLOG(INFO) << __FUNCTION__; 50 return E_NOTIMPL; 51 } 52 STDMETHOD(put_status)53 STDMETHOD(put_status)(BSTR status) { 54 DLOG(INFO) << __FUNCTION__; 55 return E_NOTIMPL; 56 } 57 STDMETHOD(get_status)58 STDMETHOD(get_status)(BSTR* status) { 59 DLOG(INFO) << __FUNCTION__; 60 return E_NOTIMPL; 61 } 62 STDMETHOD(setTimeout)63 STDMETHOD(setTimeout)(BSTR expression, long msec, VARIANT* language, 64 long* timer_id) { 65 DLOG(INFO) << __FUNCTION__; 66 return E_NOTIMPL; 67 } 68 STDMETHOD(clearTimeout)69 STDMETHOD(clearTimeout)(long timer_id) { 70 DLOG(INFO) << __FUNCTION__; 71 return E_NOTIMPL; 72 } 73 STDMETHOD(alert)74 STDMETHOD(alert)(BSTR message) { 75 DLOG(INFO) << __FUNCTION__; 76 return E_NOTIMPL; 77 } 78 STDMETHOD(confirm)79 STDMETHOD(confirm)(BSTR message, VARIANT_BOOL* confirmed) { 80 DLOG(INFO) << __FUNCTION__; 81 return E_NOTIMPL; 82 } 83 STDMETHOD(prompt)84 STDMETHOD(prompt)(BSTR message, BSTR defstr, VARIANT* textdata) { 85 DLOG(INFO) << __FUNCTION__; 86 return E_NOTIMPL; 87 } 88 STDMETHOD(get_Image)89 STDMETHOD(get_Image)(IHTMLImageElementFactory** factory) { 90 DLOG(INFO) << __FUNCTION__; 91 return E_NOTIMPL; 92 } 93 STDMETHOD(get_location)94 STDMETHOD(get_location)(IHTMLLocation** location) { 95 DLOG(INFO) << __FUNCTION__; 96 return E_NOTIMPL; 97 } 98 STDMETHOD(get_history)99 STDMETHOD(get_history)(IOmHistory** history) { 100 DLOG(INFO) << __FUNCTION__; 101 return E_NOTIMPL; 102 } 103 STDMETHOD(close)104 STDMETHOD(close)() { 105 DLOG(INFO) << __FUNCTION__; 106 return E_NOTIMPL; 107 } 108 STDMETHOD(put_opener)109 STDMETHOD(put_opener)(VARIANT opener) { 110 DLOG(INFO) << __FUNCTION__; 111 return E_NOTIMPL; 112 } 113 STDMETHOD(get_opener)114 STDMETHOD(get_opener)(VARIANT* opener) { 115 DLOG(INFO) << __FUNCTION__; 116 return E_NOTIMPL; 117 } 118 STDMETHOD(get_navigator)119 STDMETHOD(get_navigator)(IOmNavigator** navigator) { 120 DLOG(INFO) << __FUNCTION__; 121 return E_NOTIMPL; 122 } 123 STDMETHOD(put_name)124 STDMETHOD(put_name)(BSTR name) { 125 DLOG(INFO) << __FUNCTION__; 126 return E_NOTIMPL; 127 } 128 STDMETHOD(get_name)129 STDMETHOD(get_name)(BSTR* name) { 130 DLOG(INFO) << __FUNCTION__; 131 return E_NOTIMPL; 132 } 133 STDMETHOD(get_parent)134 STDMETHOD(get_parent)(IHTMLWindow2** parent) { 135 DLOG(INFO) << __FUNCTION__; 136 return E_NOTIMPL; 137 } 138 STDMETHOD(open)139 STDMETHOD(open)(BSTR url, BSTR name, BSTR features, VARIANT_BOOL replace, 140 IHTMLWindow2** window_result) { 141 DLOG(INFO) << __FUNCTION__; 142 return E_NOTIMPL; 143 } 144 STDMETHOD(get_self)145 STDMETHOD(get_self)(IHTMLWindow2** self) { 146 DLOG(INFO) << __FUNCTION__; 147 return E_NOTIMPL; 148 } 149 STDMETHOD(get_top)150 STDMETHOD(get_top)(IHTMLWindow2** top) { 151 DLOG(INFO) << __FUNCTION__; 152 return E_NOTIMPL; 153 } 154 STDMETHOD(get_window)155 STDMETHOD(get_window)(IHTMLWindow2** window) { 156 DLOG(INFO) << __FUNCTION__; 157 return E_NOTIMPL; 158 } 159 STDMETHOD(navigate)160 STDMETHOD(navigate)(BSTR url) { 161 DLOG(INFO) << __FUNCTION__; 162 return E_NOTIMPL; 163 } 164 STDMETHOD(put_onfocus)165 STDMETHOD(put_onfocus)(VARIANT focus_handler) { 166 DLOG(INFO) << __FUNCTION__; 167 return E_NOTIMPL; 168 } 169 STDMETHOD(get_onfocus)170 STDMETHOD(get_onfocus)(VARIANT* focus_handler) { 171 DLOG(INFO) << __FUNCTION__; 172 return E_NOTIMPL; 173 } 174 STDMETHOD(put_onblur)175 STDMETHOD(put_onblur)(VARIANT blur_handler) { 176 DLOG(INFO) << __FUNCTION__; 177 return E_NOTIMPL; 178 } 179 STDMETHOD(get_onblur)180 STDMETHOD(get_onblur)(VARIANT* blur_handler) { 181 DLOG(INFO) << __FUNCTION__; 182 return E_NOTIMPL; 183 } 184 STDMETHOD(put_onload)185 STDMETHOD(put_onload)(VARIANT onload_handler) { 186 DLOG(INFO) << __FUNCTION__; 187 return E_NOTIMPL; 188 } 189 STDMETHOD(get_onload)190 STDMETHOD(get_onload)(VARIANT* onload_handler) { 191 DLOG(INFO) << __FUNCTION__; 192 return E_NOTIMPL; 193 } 194 STDMETHOD(put_onbeforeunload)195 STDMETHOD(put_onbeforeunload)(VARIANT before_onload) { 196 DLOG(INFO) << __FUNCTION__; 197 return E_NOTIMPL; 198 } 199 STDMETHOD(get_onbeforeunload)200 STDMETHOD(get_onbeforeunload)(VARIANT* before_onload) { 201 DLOG(INFO) << __FUNCTION__; 202 return E_NOTIMPL; 203 } 204 STDMETHOD(put_onunload)205 STDMETHOD(put_onunload)(VARIANT unload_handler) { 206 DLOG(INFO) << __FUNCTION__; 207 return E_NOTIMPL; 208 } 209 STDMETHOD(get_onunload)210 STDMETHOD(get_onunload)(VARIANT* unload_handler) { 211 DLOG(INFO) << __FUNCTION__; 212 return E_NOTIMPL; 213 } 214 STDMETHOD(put_onhelp)215 STDMETHOD(put_onhelp)(VARIANT help_handler) { 216 DLOG(INFO) << __FUNCTION__; 217 return E_NOTIMPL; 218 } 219 STDMETHOD(get_onhelp)220 STDMETHOD(get_onhelp)(VARIANT* help_handler) { 221 DLOG(INFO) << __FUNCTION__; 222 return E_NOTIMPL; 223 } 224 STDMETHOD(put_onerror)225 STDMETHOD(put_onerror)(VARIANT error_handler) { 226 DLOG(INFO) << __FUNCTION__; 227 return E_NOTIMPL; 228 } 229 STDMETHOD(get_onerror)230 STDMETHOD(get_onerror)(VARIANT* error_handler) { 231 DLOG(INFO) << __FUNCTION__; 232 return E_NOTIMPL; 233 } 234 STDMETHOD(put_onresize)235 STDMETHOD(put_onresize)(VARIANT resize_handler) { 236 DLOG(INFO) << __FUNCTION__; 237 return E_NOTIMPL; 238 } 239 STDMETHOD(get_onresize)240 STDMETHOD(get_onresize)(VARIANT* resize_handler) { 241 DLOG(INFO) << __FUNCTION__; 242 return E_NOTIMPL; 243 } 244 STDMETHOD(put_onscroll)245 STDMETHOD(put_onscroll)(VARIANT scroll_handler) { 246 DLOG(INFO) << __FUNCTION__; 247 return E_NOTIMPL; 248 } 249 STDMETHOD(get_onscroll)250 STDMETHOD(get_onscroll)(VARIANT* scroll_handler) { 251 DLOG(INFO) << __FUNCTION__; 252 return E_NOTIMPL; 253 } 254 STDMETHOD(get_document)255 STDMETHOD(get_document)(IHTMLDocument2** document) { 256 DLOG(INFO) << __FUNCTION__; 257 return E_NOTIMPL; 258 } 259 STDMETHOD(get_event)260 STDMETHOD(get_event)(IHTMLEventObj** event_object) { 261 DLOG(INFO) << __FUNCTION__; 262 return E_NOTIMPL; 263 } 264 STDMETHOD(get__newEnum)265 STDMETHOD(get__newEnum)(IUnknown** new_enum) { 266 DLOG(INFO) << __FUNCTION__; 267 return E_NOTIMPL; 268 } 269 STDMETHOD(showModalDialog)270 STDMETHOD(showModalDialog)(BSTR dialog, VARIANT* in, VARIANT* options, 271 VARIANT* out) { 272 DLOG(INFO) << __FUNCTION__; 273 return E_NOTIMPL; 274 } 275 STDMETHOD(showHelp)276 STDMETHOD(showHelp)(BSTR help_url, VARIANT help_arg, BSTR features) { 277 DLOG(INFO) << __FUNCTION__; 278 return E_NOTIMPL; 279 } 280 STDMETHOD(get_screen)281 STDMETHOD(get_screen)(IHTMLScreen** screen) { 282 DLOG(INFO) << __FUNCTION__; 283 return E_NOTIMPL; 284 } 285 STDMETHOD(get_Option)286 STDMETHOD(get_Option)(IHTMLOptionElementFactory** option_factory) { 287 DLOG(INFO) << __FUNCTION__; 288 return E_NOTIMPL; 289 } 290 STDMETHOD(focus)291 STDMETHOD(focus)() { 292 DLOG(INFO) << __FUNCTION__; 293 return E_NOTIMPL; 294 } 295 STDMETHOD(get_closed)296 STDMETHOD(get_closed)(VARIANT_BOOL* is_closed) { 297 DLOG(INFO) << __FUNCTION__; 298 return E_NOTIMPL; 299 } 300 STDMETHOD(blur)301 STDMETHOD(blur)() { 302 DLOG(INFO) << __FUNCTION__; 303 return E_NOTIMPL; 304 } 305 STDMETHOD(scroll)306 STDMETHOD(scroll)(long x, long y) { 307 DLOG(INFO) << __FUNCTION__; 308 return E_NOTIMPL; 309 } 310 STDMETHOD(get_clientInformation)311 STDMETHOD(get_clientInformation)(IOmNavigator** navigator) { 312 DLOG(INFO) << __FUNCTION__; 313 return E_NOTIMPL; 314 } 315 STDMETHOD(setInterval)316 STDMETHOD(setInterval)(BSTR expression, long msec, VARIANT* language, 317 long* timerID) { 318 DLOG(INFO) << __FUNCTION__; 319 return E_NOTIMPL; 320 } 321 STDMETHOD(clearInterval)322 STDMETHOD(clearInterval)(long timerID) { 323 DLOG(INFO) << __FUNCTION__; 324 return E_NOTIMPL; 325 } 326 STDMETHOD(put_offscreenBuffering)327 STDMETHOD(put_offscreenBuffering)(VARIANT off_screen_buffering) { 328 DLOG(INFO) << __FUNCTION__; 329 return E_NOTIMPL; 330 } 331 STDMETHOD(get_offscreenBuffering)332 STDMETHOD(get_offscreenBuffering)(VARIANT* off_screen_buffering) { 333 DLOG(INFO) << __FUNCTION__; 334 return E_NOTIMPL; 335 } 336 STDMETHOD(execScript)337 STDMETHOD(execScript)(BSTR code, BSTR language, VARIANT* ret) { 338 DLOG(INFO) << __FUNCTION__; 339 return E_NOTIMPL; 340 } 341 STDMETHOD(toString)342 STDMETHOD(toString)(BSTR* String) { 343 DLOG(INFO) << __FUNCTION__; 344 return E_NOTIMPL; 345 } 346 STDMETHOD(scrollBy)347 STDMETHOD(scrollBy)(long x, long y) { 348 DLOG(INFO) << __FUNCTION__; 349 return E_NOTIMPL; 350 } 351 STDMETHOD(scrollTo)352 STDMETHOD(scrollTo)(long x, long y) { 353 DLOG(INFO) << __FUNCTION__; 354 return E_NOTIMPL; 355 } 356 STDMETHOD(moveTo)357 STDMETHOD(moveTo)(long x, long y) { 358 DLOG(INFO) << __FUNCTION__; 359 return E_NOTIMPL; 360 } 361 STDMETHOD(moveBy)362 STDMETHOD(moveBy)(long x, long y) { 363 DLOG(INFO) << __FUNCTION__; 364 return E_NOTIMPL; 365 } 366 STDMETHOD(resizeTo)367 STDMETHOD(resizeTo)(long x, long y) { 368 DLOG(INFO) << __FUNCTION__; 369 return E_NOTIMPL; 370 } 371 STDMETHOD(resizeBy)372 STDMETHOD(resizeBy)(long x, long y) { 373 DLOG(INFO) << __FUNCTION__; 374 return E_NOTIMPL; 375 } 376 STDMETHOD(get_external)377 STDMETHOD(get_external)(IDispatch** external) { 378 DLOG(INFO) << __FUNCTION__; 379 return E_NOTIMPL; 380 } 381 382 }; 383 384 #endif // CHROME_FRAME_HTML_WINDOW_IMPL_H_ 385 386