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

Unified 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.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/plugin/PluginClass.cpp ('K') | « src/plugin/PluginTabBase.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginTabBase.cpp
===================================================================
--- a/src/plugin/PluginTabBase.cpp
+++ b/src/plugin/PluginTabBase.cpp
@@ -62,6 +62,17 @@
}
}
+/**
+ * ABP only intercepts protocols "http:" and "https:".
+ * We can disable any domain used in those protocol with an appropriate whitelist filter.
+ * Thus, the possibility to disable on a particular site depends only on the protocol.
+ */
+bool CPluginTabBase::IsPossibleToDisableOnSite()
+{
+ auto url = GetDocumentUrl();
+ return BeginsWith(url, L"http:") || BeginsWith(url, L"https:");
+}
+
void CPluginTabBase::OnActivate()
{
m_isActivated = true;
« 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