Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cOleWebBrowserRedir.h
Go to the documentation of this file.
1 //
4 //
5 #ifndef _INC_CComWebBrowserRedir_H
6 #define _INC_CComWebBrowserRedir_H
7 #ifndef NO_PRAGMA_ONCE
8 #pragma once
9 #endif
10 #include "cOleControl.h"
11 #include "cOleClientSite.h"
12 
13 #if defined(_WIN32) && defined(_MSC_VER)
14 struct IWebBrowser2;
15 
16 namespace GrayLib
17 {
18  class CComWebBrowserStub;
19 
20  class cOleWebBrowserRedir
21  {
25 
26  private:
27  cIUnkPtr<IWebBrowser2> m_pStub;
28  cIUnkPtr<IWebBrowser2> m_pCurrent;
29 
30  public:
31  cOleWebBrowserRedir(void);
32  virtual ~cOleWebBrowserRedir(void);
33 
34  bool isWebBrowserStub() const
35  {
37  return m_pCurrent == m_pStub;
38  }
39  IWebBrowser2* GetWebBrowser() const
40  {
41  // Just get the current browser. stub or not.
42  return m_pCurrent;
43  }
44  virtual IWebBrowser2* GetWebBrowser2();
45  void SetWebBrowser(IWebBrowser2* pWB);
46 
47  // Called when the null IWebBrowser wants to navigate. (we should then create a real web browser) and SetWebBrowser() to it.
48  virtual HRESULT onNavigate(cString sURL) = 0;
49  };
50 };
51 #endif
52 #endif
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cMesh.h:22
cStringT< GChar_t > cString
Definition: cString.h:636