OLD | NEW |
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 /** |
| 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() |
| 71 { |
| 72 auto url = GetDocumentUrl(); |
| 73 return BeginsWith(url, L"http:") || BeginsWith(url, L"https:"); |
| 74 } |
| 75 |
65 void CPluginTabBase::OnActivate() | 76 void CPluginTabBase::OnActivate() |
66 { | 77 { |
67 m_isActivated = true; | 78 m_isActivated = true; |
68 } | 79 } |
69 | 80 |
70 | 81 |
71 void CPluginTabBase::OnUpdate() | 82 void CPluginTabBase::OnUpdate() |
72 { | 83 { |
73 m_isActivated = true; | 84 m_isActivated = true; |
74 } | 85 } |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 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()); |
435 } | 446 } |
436 | 447 |
437 // Non-hanging sleep | 448 // Non-hanging sleep |
438 Sleep(50); | 449 Sleep(50); |
439 } | 450 } |
440 | 451 |
441 tabLoopIteration++; | 452 tabLoopIteration++; |
442 } | 453 } |
443 } | 454 } |
OLD | NEW |