OLD | NEW |
1 /* | 1 /* |
2 * http://msdn.microsoft.com/en-us/library/bb250436.aspx | 2 * http://msdn.microsoft.com/en-us/library/bb250436.aspx |
3 */ | 3 */ |
4 | 4 |
5 #ifndef _PLUGIN_CLASS_H_ | 5 #ifndef _PLUGIN_CLASS_H_ |
6 #define _PLUGIN_CLASS_H_ | 6 #define _PLUGIN_CLASS_H_ |
7 | 7 |
8 | 8 |
9 #include "PluginTypedef.h" | 9 #include "PluginTypedef.h" |
10 #include "Plugin.h" | 10 #include "Plugin.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 DISPPARAMS * pdispparams, VARIANT * pvarResult,EXCEPINFO * pexcepinfo, UINT
* puArgErr); | 74 DISPPARAMS * pdispparams, VARIANT * pvarResult,EXCEPINFO * pexcepinfo, UINT
* puArgErr); |
75 | 75 |
76 static CPluginTab* GetTab(DWORD dwThreadId); | 76 static CPluginTab* GetTab(DWORD dwThreadId); |
77 CPluginTab* GetTab(); | 77 CPluginTab* GetTab(); |
78 | 78 |
79 void UpdateStatusBar(); | 79 void UpdateStatusBar(); |
80 static DWORD WINAPI MainThreadProc(LPVOID pParam); | 80 static DWORD WINAPI MainThreadProc(LPVOID pParam); |
81 | 81 |
82 private: | 82 private: |
83 | 83 |
84 bool SetMenuBar(HMENU hMenu, const CString& url); | 84 bool SetMenuBar(HMENU hMenu, const std::wstring& url); |
85 HMENU CreatePluginMenu(const CString& url); | 85 HMENU CreatePluginMenu(const std::wstring& url); |
86 | 86 |
87 void DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, UINT nMenuFla
gs); | 87 void DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, UINT nMenuFla
gs); |
88 bool CreateStatusBarPane(); | 88 bool CreateStatusBarPane(); |
89 | 89 |
90 CComPtr<IConnectionPoint> GetConnectionPoint(); | 90 CComPtr<IConnectionPoint> GetConnectionPoint(); |
91 CComPtr<IConnectionPoint> GetConnectionPointPropSink(); | 91 CComPtr<IConnectionPoint> GetConnectionPointPropSink(); |
92 | 92 |
93 public: | 93 public: |
94 HWND GetBrowserHWND() const; | 94 HWND GetBrowserHWND() const; |
95 HWND GetTabHWND() const; | 95 HWND GetTabHWND() const; |
96 CComQIPtr<IWebBrowser2> GetBrowser() const; | 96 CComQIPtr<IWebBrowser2> GetBrowser() const; |
97 | 97 |
98 STDMETHODIMP OnTabChanged(DISPPARAMS* pDispParams, WORD wFlags); | 98 STDMETHODIMP OnTabChanged(DISPPARAMS* pDispParams, WORD wFlags); |
99 | 99 |
100 static CPluginMimeFilterClient* s_mimeFilter; | 100 static CPluginMimeFilterClient* s_mimeFilter; |
101 | 101 |
102 private: | 102 private: |
103 | 103 |
104 CString GetBrowserUrl() const; | 104 std::wstring GetBrowserUrl() const; |
105 | |
106 | 105 |
107 static DWORD WINAPI StartInitObject(LPVOID thisPtr); | 106 static DWORD WINAPI StartInitObject(LPVOID thisPtr); |
108 bool InitObject(bool bBHO); | 107 bool InitObject(bool bBHO); |
109 void CloseTheme(); | 108 void CloseTheme(); |
110 void UpdateTheme(); | 109 void UpdateTheme(); |
111 | 110 |
112 static HICON GetStatusBarIcon(const CString& url); | 111 static HICON GetStatusBarIcon(const std::wstring& url); |
113 static CPluginClass* FindInstance(HWND hStatusBarWnd); | 112 static CPluginClass* FindInstance(HWND hStatusBarWnd); |
114 static LRESULT CALLBACK NewStatusProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam); | 113 static LRESULT CALLBACK NewStatusProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam); |
115 static LRESULT CALLBACK PaneWindowProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam); | 114 static LRESULT CALLBACK PaneWindowProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam); |
116 static void FirstRunThread(); | 115 static void FirstRunThread(); |
117 void BeforeNavigate2(DISPPARAMS* pDispParams); | 116 void BeforeNavigate2(DISPPARAMS* pDispParams); |
118 | 117 |
119 void Unadvice(); | 118 void Unadvice(); |
120 | 119 |
121 void ShowStatusBar(); | 120 void ShowStatusBar(); |
122 bool IsStatusBarEnabled(); | 121 bool IsStatusBarEnabled(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 167 |
169 // Async browser | 168 // Async browser |
170 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; | 169 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; |
171 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); | 170 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); |
172 }; | 171 }; |
173 | 172 |
174 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) | 173 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) |
175 | 174 |
176 | 175 |
177 #endif // _PLUGIN_CLASS_H_ | 176 #endif // _PLUGIN_CLASS_H_ |
OLD | NEW |