Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: src/plugin/PluginClass.h

Issue 29330403: Issue #1467, #3397 - Rewrite the map from threads to tabs (Closed)
Left Patch Set: Created Nov. 22, 2015, 8:17 p.m.
Right Patch Set: add comment; new function body Created July 17, 2016, 4:01 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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-2016 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 ~CPluginClass(); 79 ~CPluginClass();
80 80
81 // IObjectWithSite 81 // IObjectWithSite
82 STDMETHOD(SetSite)(IUnknown *pUnkSite); 82 STDMETHOD(SetSite)(IUnknown *pUnkSite);
83 83
84 // IOleCommandTarget 84 // IOleCommandTarget
85 STDMETHOD(QueryStatus)(const GUID* pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT* pCmdText); 85 STDMETHOD(QueryStatus)(const GUID* pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT* pCmdText);
86 STDMETHOD(Exec)(const GUID*, DWORD nCmdID, DWORD, VARIANTARG*, VARIANTARG* pva Out); 86 STDMETHOD(Exec)(const GUID*, DWORD nCmdID, DWORD, VARIANTARG*, VARIANTARG* pva Out);
87 87
88 88
89 static CPluginTab* GetTabCurrentThread(); 89 static CPluginTab* GetTabForCurrentThread();
90 CPluginTab* GetTab(); 90 CPluginTab* GetTab();
91 91
92 void UpdateStatusBar(); 92 void UpdateStatusBar();
93 93
94 private: 94 private:
95 95
96 bool SetMenuBar(HMENU hMenu, const std::wstring& url); 96 bool SetMenuBar(HMENU hMenu, const std::wstring& url);
97 HMENU CreatePluginMenu(const std::wstring& url); 97 HMENU CreatePluginMenu(const std::wstring& url);
98 98
99 void DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, UINT nMenuFla gs); 99 void DisplayPluginMenu(HMENU hMenu, int nToolbarCmdID, POINT pt, UINT nMenuFla gs);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT * /*urlOrPidl*/); 131 void STDMETHODCALLTYPE OnDocumentComplete(IDispatch* frameBrowserDisp, VARIANT * /*urlOrPidl*/);
132 void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask); 132 void STDMETHODCALLTYPE OnWindowStateChanged(unsigned long flags, unsigned long validFlagsMask);
133 void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable) ; 133 void STDMETHODCALLTYPE OnCommandStateChange(long command, VARIANT_BOOL enable) ;
134 void STDMETHODCALLTYPE OnOnQuit(); 134 void STDMETHODCALLTYPE OnOnQuit();
135 void Unadvise(); 135 void Unadvise();
136 136
137 void ShowStatusBar(); 137 void ShowStatusBar();
138 bool IsStatusBarEnabled(); 138 bool IsStatusBarEnabled();
139 139
140 /** 140 /**
141 * Our site object as a browser. 141 * A browser interface pointer to our site object
142 * 142 *
143 * It's values are set and reset solely in SetSite(). 143 * It's values are set and reset solely in SetSite().
144 * The declaration as CComPtr is defensive programming;
145 * it ensures that the site keeps this interface alive for us in the
146 * unlikely case that the site is different from a browser.
147 */ 144 */
148 CComPtr<IWebBrowser2> m_webBrowser2; 145 CComPtr<IWebBrowser2> m_webBrowser2;
149 HWND m_hBrowserWnd; 146 HWND m_hBrowserWnd;
150 HWND m_hTabWnd; 147 HWND m_hTabWnd;
151 HWND m_hStatusBarWnd; 148 HWND m_hStatusBarWnd;
152 HWND m_hPaneWnd; 149 HWND m_hPaneWnd;
153 150
154 WNDPROC m_pWndProcStatus; 151 WNDPROC m_pWndProcStatus;
155 int m_nPaneWidth; 152 int m_nPaneWidth;
156 HANDLE m_hTheme; 153 HANDLE m_hTheme;
(...skipping 26 matching lines...) Expand all
183 static CComAutoCriticalSection s_criticalSectionWindow; 180 static CComAutoCriticalSection s_criticalSectionWindow;
184 181
185 // Async browser 182 // Async browser
186 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2; 183 static CComQIPtr<IWebBrowser2> s_asyncWebBrowser2;
187 static CComQIPtr<IWebBrowser2> GetAsyncBrowser(); 184 static CComQIPtr<IWebBrowser2> GetAsyncBrowser();
188 }; 185 };
189 186
190 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass) 187 OBJECT_ENTRY_AUTO(__uuidof(PluginClass), CPluginClass)
191 188
192 #endif // _PLUGIN_CLASS_H_ 189 #endif // _PLUGIN_CLASS_H_
LEFTRIGHT

Powered by Google App Engine
This is Rietveld