| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 void CPluginTabBase::OnUpdate() | 80 void CPluginTabBase::OnUpdate() |
| 81 { | 81 { |
| 82 m_isActivated = true; | 82 m_isActivated = true; |
| 83 } | 83 } |
| 84 | 84 |
| 85 namespace | 85 namespace |
| 86 { | 86 { |
| 87 // Entry Point |
| 87 void FilterLoader(CPluginTabBase* tabBase) | 88 void FilterLoader(CPluginTabBase* tabBase) |
| 88 { | 89 { |
| 89 tabBase->m_filter->LoadHideFilters(CPluginClient::GetInstance()->GetElementH
idingSelectors(tabBase->GetDocumentDomain())); | 90 try |
| 90 SetEvent(tabBase->m_filter->hideFiltersLoadedEvent); | 91 { |
| 92 tabBase->m_filter->LoadHideFilters(CPluginClient::GetInstance()->GetElemen
tHidingSelectors(tabBase->GetDocumentDomain())); |
| 93 SetEvent(tabBase->m_filter->hideFiltersLoadedEvent); |
| 94 } |
| 95 catch (...) |
| 96 { |
| 97 // As a thread-main function, we truncate any C++ exception. |
| 98 } |
| 91 } | 99 } |
| 92 } | 100 } |
| 93 | 101 |
| 94 void CPluginTabBase::OnNavigate(const std::wstring& url) | 102 void CPluginTabBase::OnNavigate(const std::wstring& url) |
| 95 { | 103 { |
| 96 SetDocumentUrl(url); | 104 SetDocumentUrl(url); |
| 97 ClearFrameCache(GetDocumentDomain()); | 105 ClearFrameCache(GetDocumentDomain()); |
| 98 std::wstring domainString = GetDocumentDomain(); | 106 std::wstring domainString = GetDocumentDomain(); |
| 99 ResetEvent(m_filter->hideFiltersLoadedEvent); | 107 ResetEvent(m_filter->hideFiltersLoadedEvent); |
| 100 try | 108 try |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError.
GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr
ue, pluginError.GetProcessId(), pluginError.GetThreadId()); | 374 CPluginClient::LogPluginError(pluginError.GetErrorCode(), pluginError.
GetErrorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), tr
ue, pluginError.GetProcessId(), pluginError.GetThreadId()); |
| 367 } | 375 } |
| 368 | 376 |
| 369 // Non-hanging sleep | 377 // Non-hanging sleep |
| 370 Sleep(50); | 378 Sleep(50); |
| 371 } | 379 } |
| 372 | 380 |
| 373 tabLoopIteration++; | 381 tabLoopIteration++; |
| 374 } | 382 } |
| 375 } | 383 } |
| OLD | NEW |