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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 { | 478 { |
479 return; | 479 return; |
480 } | 480 } |
481 if (!urlVariant || urlVariant->vt != VT_BSTR) | 481 if (!urlVariant || urlVariant->vt != VT_BSTR) |
482 { | 482 { |
483 return; | 483 return; |
484 } | 484 } |
485 std::wstring url(urlVariant->bstrVal, SysStringLen(urlVariant->bstrVal)); | 485 std::wstring url(urlVariant->bstrVal, SysStringLen(urlVariant->bstrVal)); |
486 UnescapeUrl(url); | 486 UnescapeUrl(url); |
487 | 487 |
488 //Register a mime filter if it's not registered yet | |
489 if (s_mimeFilter == nullptr) | |
490 { | |
491 s_mimeFilter = CPluginClientFactory::GetMimeFilterClientInstance(); | |
492 } | |
493 // If webbrowser2 is equal to top level browser (as set in SetSite), we are | 488 // If webbrowser2 is equal to top level browser (as set in SetSite), we are |
494 // navigating new page | 489 // navigating new page |
495 CPluginClient* client = CPluginClient::GetInstance(); | 490 CPluginClient* client = CPluginClient::GetInstance(); |
496 if (url.find(L"javascript") == 0) | 491 if (url.find(L"javascript") == 0) |
497 { | 492 { |
498 } | 493 } |
499 else if (GetBrowser().IsEqualObject(webBrowser)) | 494 else if (GetBrowser().IsEqualObject(webBrowser)) |
500 { | 495 { |
501 m_tab->OnNavigate(url); | 496 m_tab->OnNavigate(url); |
502 DEBUG_GENERAL( | 497 DEBUG_GENERAL( |
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 s_criticalSectionLocal.Unlock(); | 1736 s_criticalSectionLocal.Unlock(); |
1742 | 1737 |
1743 } | 1738 } |
1744 } | 1739 } |
1745 } | 1740 } |
1746 | 1741 |
1747 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); | 1742 hTabWnd = ::GetWindow(hTabWnd, GW_HWNDNEXT); |
1748 } | 1743 } |
1749 return hTabWnd; | 1744 return hTabWnd; |
1750 } | 1745 } |
OLD | NEW |