FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
ActiveXCore/AXDOM/Window.h
1 /**********************************************************\
2 Original Author: Richard Bateman (taxilian)
3 
4 Created: Sep 21, 2010
5 License: Dual license model; choose one of two:
6  New BSD License
7  http://www.opensource.org/licenses/bsd-license.php
8  - or -
9  GNU Lesser General Public License, version 2.1
10  http://www.gnu.org/licenses/lgpl-2.1.html
11 
12 Copyright 2010 Facebook, Inc and the Firebreath development team
13 \**********************************************************/
14 
15 #pragma once
16 #ifndef H_AXDOM_WINDOW
17 #define H_AXDOM_WINDOW
18 
19 #include "win_common.h"
20 #include <atlctl.h>
21 #include <string>
22 #include <boost/shared_ptr.hpp>
23 #include "Node.h"
24 #include "DOM/Window.h"
25 
26 namespace FB { namespace ActiveX {
27  namespace AXDOM {
28 
34  class Window : public virtual FB::DOM::Window, public virtual Node
35  {
36  public:
37  Window(FB::JSObjectPtr obj, IWebBrowser2 *web);
38  virtual ~Window();
39 
40  public:
41  virtual FB::DOM::DocumentPtr getDocument() const;
42  virtual void alert(const std::string& str) const;
43  virtual std::string getLocation() const;
44 
45  protected:
46  CComQIPtr<IHTMLWindow2> m_htmlWin;
47  CComPtr<IWebBrowser2> m_webBrowser;
48  };
49 
50  };
51 } }
52 
53 #endif // H_AXDOM_WINDOW
54 
boost::shared_ptr< FB::JSObject > JSObjectPtr
Defines an alias representing a JSObject shared_ptr (you should never use a JSObject* directly) ...
Definition: APITypes.h:109
ActiveX specific implementation of DOM::Window.
boost::shared_ptr< Document > DocumentPtr
shared_ptr for a FB::DOM::Document
virtual std::string getLocation() const
Returns window.location for the containing page.
DOM Window abstraction for manipulating and accessing the javascript window object that the plugin is...
Provides an ActiveX specific implementation of DOM::Node.
virtual void alert(const std::string &str) const
Pop up a JS alert box.
virtual FB::DOM::DocumentPtr getDocument() const
Gets the DOM Document contained in this window.