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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // https://msdn.microsoft.com/en-us/library/aa752136(v=vs.85).aspx | 217 // https://msdn.microsoft.com/en-us/library/aa752136(v=vs.85).aspx |
218 if (parentDispatch.IsEqualObject(&browser)) | 218 if (parentDispatch.IsEqualObject(&browser)) |
219 { | 219 { |
220 return nullptr; | 220 return nullptr; |
221 } | 221 } |
222 ATL::CComQIPtr<IServiceProvider> parentDocumentServiceProvider = parentDispa
tch; | 222 ATL::CComQIPtr<IServiceProvider> parentDocumentServiceProvider = parentDispa
tch; |
223 if (!parentDocumentServiceProvider) | 223 if (!parentDocumentServiceProvider) |
224 { | 224 { |
225 return nullptr; | 225 return nullptr; |
226 } | 226 } |
227 ATL::CComPtr<IWebBrowser2> webBrowser; | 227 ATL::CComPtr<IWebBrowser2> parentBrowser; |
228 if (FAILED(parentDocumentServiceProvider->QueryService(SID_SWebBrowserApp, &
webBrowser))) | 228 if (FAILED(parentDocumentServiceProvider->QueryService(SID_SWebBrowserApp, &
parentBrowser))) |
229 { | 229 { |
230 return nullptr; | 230 return nullptr; |
231 } | 231 } |
232 return webBrowser; | 232 return parentBrowser; |
233 } | 233 } |
234 | 234 |
235 bool IsFrameWhiteListed(ATL::CComPtr<IWebBrowser2> frame) | 235 bool IsFrameWhiteListed(ATL::CComPtr<IWebBrowser2> frame) |
236 { | 236 { |
237 if (!frame) | 237 if (!frame) |
238 { | 238 { |
239 return false; | 239 return false; |
240 } | 240 } |
241 auto url = GetLocationUrl(*frame); | 241 auto url = GetLocationUrl(*frame); |
242 std::vector<std::string> frameHierarchy; | 242 std::vector<std::string> frameHierarchy; |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 LogQueue::LogPluginError(pluginError.GetErrorCode(), pluginError.GetEr
rorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true, p
luginError.GetProcessId(), pluginError.GetThreadId()); | 432 LogQueue::LogPluginError(pluginError.GetErrorCode(), pluginError.GetEr
rorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true, p
luginError.GetProcessId(), pluginError.GetThreadId()); |
433 } | 433 } |
434 | 434 |
435 // Non-hanging sleep | 435 // Non-hanging sleep |
436 Sleep(50); | 436 Sleep(50); |
437 } | 437 } |
438 | 438 |
439 tabLoopIteration++; | 439 tabLoopIteration++; |
440 } | 440 } |
441 } | 441 } |
LEFT | RIGHT |