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

Side by Side Diff: src/plugin/PluginTabBase.h

Issue 29334397: Issue #2230, #3391 - Load filters on "download begin" event
Patch Set: Created Jan. 22, 2016, 6:02 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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-2016 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
(...skipping 21 matching lines...) Expand all
32 CriticalSection m_csInject; 32 CriticalSection m_csInject;
33 33
34 std::wstring m_documentDomain; 34 std::wstring m_documentDomain;
35 std::wstring m_documentUrl; 35 std::wstring m_documentUrl;
36 CPluginUserSettings m_pluginUserSettings; 36 CPluginUserSettings m_pluginUserSettings;
37 bool m_isActivated; 37 bool m_isActivated;
38 38
39 std::thread m_thread; 39 std::thread m_thread;
40 std::atomic<bool> m_continueThreadRunning; 40 std::atomic<bool> m_continueThreadRunning;
41 public: 41 public:
42 CPluginFilter m_filter; 42 std::unique_ptr<CPluginFilter> filter;
Eric 2016/02/03 18:03:20 As simple as this change looks, it's the core of t
43 private: 43 private:
44 void ThreadProc(); 44 void ThreadProc();
45 CComAutoCriticalSection m_criticalSectionCache; 45 CComAutoCriticalSection m_criticalSectionCache;
46 std::set<std::wstring> m_cacheFrames; 46 std::set<std::wstring> m_cacheFrames;
47 std::wstring m_cacheDomain; 47 std::wstring m_cacheDomain;
48 void InjectABP(IWebBrowser2* browser); 48 void InjectABP(IWebBrowser2* browser);
49 public: 49 public:
50 50
51 CPluginTab(); 51 CPluginTab();
52 ~CPluginTab(); 52 ~CPluginTab();
53 53
54 std::wstring GetDocumentDomain(); 54 std::wstring GetDocumentDomain();
55 void SetDocumentUrl(const std::wstring& url); 55 void SetDocumentUrl(const std::wstring& url);
56 std::wstring GetDocumentUrl(); 56 std::wstring GetDocumentUrl();
57 virtual void OnActivate(); 57 virtual void OnActivate();
58 virtual void OnUpdate(); 58 virtual void OnUpdate();
59 virtual void OnNavigate(const std::wstring& url); 59 virtual void OnNavigate(const std::wstring& url);
60 void OnDownloadBegin();
60 virtual void OnDownloadComplete(IWebBrowser2* browser); 61 virtual void OnDownloadComplete(IWebBrowser2* browser);
61 virtual void OnDocumentComplete(IWebBrowser2* browser, const std::wstring& url , bool isDocumentBrowser); 62 virtual void OnDocumentComplete(IWebBrowser2* browser, const std::wstring& url , bool isDocumentBrowser);
62 static DWORD WINAPI TabThreadProc(LPVOID pParam); 63 static DWORD WINAPI TabThreadProc(LPVOID pParam);
63 void CacheFrame(const std::wstring& url); 64 void CacheFrame(const std::wstring& url);
64 bool IsFrameCached(const std::wstring& url); 65 bool IsFrameCached(const std::wstring& url);
65 void ClearFrameCache(const std::wstring& domain=L""); 66 void ClearFrameCache(const std::wstring& domain=L"");
66 /** 67 /**
67 * Is it possible to disable the current content of the present tab on a per-s ite basis? 68 * Is it possible to disable the current content of the present tab on a per-s ite basis?
68 */ 69 */
69 bool IsPossibleToDisableOnSite(); 70 bool IsPossibleToDisableOnSite();
70 }; 71 };
71 72
72 #endif // _PLUGIN_TAB_BASE_H_ 73 #endif // _PLUGIN_TAB_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld