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

Delta Between Two Patch Sets: src/plugin/WebBrowserEventsListener.cpp

Issue 6567422169448448: Issue 119 - Switch to injecting CSS for element hiding (Closed)
Left Patch Set: rebase, improve memory handling (OnQuit) and improve code organizing Created April 27, 2016, 1:10 p.m.
Right Patch Set: rename OnQuit Created Sept. 30, 2016, 3:25 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/plugin/WebBrowserEventsListener.h ('k') | src/shared/EventWithSetter.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // We can get here when readyStateChanged("complete") is already received, 52 // We can get here when readyStateChanged("complete") is already received,
53 // don't emit reloaded, because it's already emitted from OnReadyStateChange. 53 // don't emit reloaded, because it's already emitted from OnReadyStateChange.
54 if (m_state == State::FirstTimeLoading) 54 if (m_state == State::FirstTimeLoading)
55 { 55 {
56 m_state = State::Loaded; 56 m_state = State::Loaded;
57 emitReloaded(); 57 emitReloaded();
58 } 58 }
59 return S_OK; 59 return S_OK;
60 } 60 }
61 61
62 void STDMETHODCALLTYPE WebBrowserEventsListener::OnOnQuit() 62 void STDMETHODCALLTYPE WebBrowserEventsListener::OnQuit()
Oleksandr 2016/09/30 15:29:20 OnOnQuit sounds somewhat meta. How about just OnQu
63 { 63 {
64 if (m_isDocumentEvents2Connected) 64 if (m_isDocumentEvents2Connected)
65 { 65 {
66 ATL::CComPtr<IDispatch> dispDocument; 66 ATL::CComPtr<IDispatch> dispDocument;
67 ATL::CComQIPtr<IHTMLDocument2> htmlDocument2; 67 ATL::CComQIPtr<IHTMLDocument2> htmlDocument2;
68 if (SUCCEEDED(m_browser->get_Document(&dispDocument)) && (htmlDocument2 = di spDocument)) 68 if (SUCCEEDED(m_browser->get_Document(&dispDocument)) && (htmlDocument2 = di spDocument))
69 { 69 {
70 HTMLDocumentEvents2Listener::DispEventUnadvise(htmlDocument2); 70 HTMLDocumentEvents2Listener::DispEventUnadvise(htmlDocument2);
71 } 71 }
72 } 72 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return S_OK; 155 return S_OK;
156 } 156 }
157 157
158 void WebBrowserEventsListener::emitReloaded() 158 void WebBrowserEventsListener::emitReloaded()
159 { 159 {
160 if (m_onReloaded) 160 if (m_onReloaded)
161 { 161 {
162 m_onReloaded(); 162 m_onReloaded();
163 } 163 }
164 } 164 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld