Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 private: | 95 private: |
96 | 96 |
97 bool SetMenuBar(HMENU hMenu, const std::wstring& url); | 97 bool SetMenuBar(HMENU hMenu, const std::wstring& url); |
98 HMENU CreatePluginMenu(const std::wstring& url); | 98 HMENU CreatePluginMenu(const std::wstring& url); |
99 | 99 |
100 void DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, UINT nMenuFla gs); | 100 void DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, UINT nMenuFla gs); |
101 bool CreateStatusBarPane(); | 101 bool CreateStatusBarPane(); |
102 | 102 |
103 public: | 103 public: |
104 HWND GetBrowserHWND() const; | 104 HWND GetBrowserHWND() const; |
105 bool IsRootPageBrowser(IWebBrowser2*); | 105 bool IsRootBrowser(IWebBrowser2*); |
106 | 106 |
107 static CPluginMimeFilterClient* s_mimeFilter; | 107 static CPluginMimeFilterClient* s_mimeFilter; |
108 | 108 |
109 private: | 109 private: |
110 | 110 |
111 std::wstring GetBrowserUrl() const; | 111 std::wstring GetBrowserUrl() const; |
112 | 112 |
113 static DWORD WINAPI StartInitObject(LPVOID thisPtr); | 113 static DWORD WINAPI StartInitObject(LPVOID thisPtr); |
114 bool InitObject(); | 114 bool InitObject(); |
115 void CloseTheme(); | 115 void CloseTheme(); |
(...skipping 15 matching lines...) Expand all Loading... | |
131 void STDMETHODCALLTYPE OnDownloadComplete(); | 131 void STDMETHODCALLTYPE OnDownloadComplete(); |
132 void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT * /*urlOrPidl*/); | 132 void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT * /*urlOrPidl*/); |
133 void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask); | 133 void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask); |
134 void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable) ; | 134 void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable) ; |
135 void STDMETHODCALLTYPE OnOnQuit(); | 135 void STDMETHODCALLTYPE OnOnQuit(); |
136 void Unadvise(); | 136 void Unadvise(); |
137 | 137 |
138 void ShowStatusBar(); | 138 void ShowStatusBar(); |
139 bool IsStatusBarEnabled(); | 139 bool IsStatusBarEnabled(); |
140 | 140 |
141 IWebBrowser2* m_webBrowser2; | 141 /** |
sergei
2015/10/01 16:15:51
I really don't understand the reluctance to use sm
Oleksandr
2015/10/05 10:44:47
+1.
Eric
2015/11/18 13:57:31
My rule: Use them when you need them and don't use
| |
142 * A browser interface pointer to our site object | |
143 * | |
144 * It's values are set and reset solely in SetSite(). | |
145 */ | |
146 CComPtr<IWebBrowser2> m_webBrowser2; | |
142 HWND m_hBrowserWnd; | 147 HWND m_hBrowserWnd; |
143 HWND m_hTabWnd; | 148 HWND m_hTabWnd; |
144 HWND m_hStatusBarWnd; | 149 HWND m_hStatusBarWnd; |
145 HWND m_hPaneWnd; | 150 HWND m_hPaneWnd; |
146 | 151 |
147 WNDPROC m_pWndProcStatus; | 152 WNDPROC m_pWndProcStatus; |
148 int m_nPaneWidth; | 153 int m_nPaneWidth; |
149 HANDLE m_hTheme; | 154 HANDLE m_hTheme; |
150 | 155 |
151 CriticalSection m_csStatusBar; | 156 CriticalSection m_csStatusBar; |
(...skipping 26 matching lines...) Expand all Loading... | |
178 | 183 |
179 // Async browser | 184 // Async browser |
180 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; | 185 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; |
181 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); | 186 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); |
182 }; | 187 }; |
183 | 188 |
184 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) | 189 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) |
185 | 190 |
186 | 191 |
187 #endif // _PLUGIN_CLASS_H_ | 192 #endif // _PLUGIN_CLASS_H_ |
LEFT | RIGHT |