Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: src/plugin/PluginTabBase.cpp

Issue 29332455: Issue #1596, #1720 - Make status bar menu consistent with plugin abilities (Closed)
Patch Set: address comments Created Dec. 9, 2015, 12:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« src/plugin/PluginClass.cpp ('K') | « src/plugin/PluginTabBase.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« src/plugin/PluginClass.cpp ('K') | « src/plugin/PluginTabBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld