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: Created Dec. 8, 2015, 6:58 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/PluginTabBase.h ('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 bool CPluginTabBase::CanDisableOnSite()
66 {
67 auto url = GetDocumentUrl();
68 return BeginsWith(url, L"http:") || BeginsWith(url, L"https:");
69 }
70
65 void CPluginTabBase::OnActivate() 71 void CPluginTabBase::OnActivate()
66 { 72 {
67 m_isActivated = true; 73 m_isActivated = true;
68 } 74 }
69 75
70 76
71 void CPluginTabBase::OnUpdate() 77 void CPluginTabBase::OnUpdate()
72 { 78 {
73 m_isActivated = true; 79 m_isActivated = true;
74 } 80 }
(...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()); 440 LogQueue::LogPluginError(pluginError.GetErrorCode(), pluginError.GetEr rorId(), pluginError.GetErrorSubid(), pluginError.GetErrorDescription(), true, p luginError.GetProcessId(), pluginError.GetThreadId());
435 } 441 }
436 442
437 // Non-hanging sleep 443 // Non-hanging sleep
438 Sleep(50); 444 Sleep(50);
439 } 445 }
440 446
441 tabLoopIteration++; 447 tabLoopIteration++;
442 } 448 }
443 } 449 }
OLDNEW
« src/plugin/PluginTabBase.h ('K') | « src/plugin/PluginTabBase.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld