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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 CPluginTabBase::~CPluginTabBase() | 55 CPluginTabBase::~CPluginTabBase() |
56 { | 56 { |
57 delete m_traverser; | 57 delete m_traverser; |
58 m_traverser = NULL; | 58 m_traverser = NULL; |
59 m_continueThreadRunning = false; | 59 m_continueThreadRunning = false; |
60 if (m_thread.joinable()) { | 60 if (m_thread.joinable()) { |
61 m_thread.join(); | 61 m_thread.join(); |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
65 bool CPluginTabBase::CanDisableOnSite() | 65 /** |
| 66 * ABP only intercepts protocols "http:" and "https:". |
| 67 * We can disable any domain used in those protocol with an appropriate whitelis
t filter. |
| 68 * Thus, the possibility to disable on a particular site depends only on the pro
tocol. |
| 69 */ |
| 70 bool CPluginTabBase::IsPossibleToDisableOnSite() |
66 { | 71 { |
67 auto url = GetDocumentUrl(); | 72 auto url = GetDocumentUrl(); |
68 return BeginsWith(url, L"http:") || BeginsWith(url, L"https:"); | 73 return BeginsWith(url, L"http:") || BeginsWith(url, L"https:"); |
69 } | 74 } |
70 | 75 |
71 void CPluginTabBase::OnActivate() | 76 void CPluginTabBase::OnActivate() |
72 { | 77 { |
73 m_isActivated = true; | 78 m_isActivated = true; |
74 } | 79 } |
75 | 80 |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 LogQueue::LogPluginError(pluginError.GetErrorCode(), pluginError.GetEr
rorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true, p
luginError.GetProcessId(), pluginError.GetThreadId()); | 445 LogQueue::LogPluginError(pluginError.GetErrorCode(), pluginError.GetEr
rorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true, p
luginError.GetProcessId(), pluginError.GetThreadId()); |
441 } | 446 } |
442 | 447 |
443 // Non-hanging sleep | 448 // Non-hanging sleep |
444 Sleep(50); | 449 Sleep(50); |
445 } | 450 } |
446 | 451 |
447 tabLoopIteration++; | 452 tabLoopIteration++; |
448 } | 453 } |
449 } | 454 } |
LEFT | RIGHT |