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

Delta Between Two Patch Sets: src/plugin/PluginUserSettings.h

Issue 5979857238360064: Issues #1163, #1173 - refactor CPluginUserSettings (Closed)
Left Patch Set: Created Aug. 6, 2014, 4:56 p.m.
Right Patch Set: rebase + add one final space character Created Feb. 23, 2015, 1:37 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 | « no previous file | src/plugin/PluginUserSettings.cpp » ('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 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */
1 #ifndef PLUGIN_USER_SETTINGS_H 17 #ifndef PLUGIN_USER_SETTINGS_H
2 #define PLUGIN_USER_SETTINGS_H 18 #define PLUGIN_USER_SETTINGS_H
3 #pragma once
Oleksandr 2014/08/17 22:52:01 Do we really need both #pragma once and #ifndef ab
Eric 2014/09/29 18:45:41 It's not needed for correctness; the #ifndef guard
Oleksandr 2014/10/02 20:36:53 I have never seen both versions used simultaniousl
Eric 2014/10/14 22:23:50 All four of the ATL library use this pattern, for
4 19
5 #include <OAIdl.h> 20 #include <OAIdl.h>
6 21
7 /* 22 /*
8 Class is used to call methods Get,Set,Update of Settings object from JavaScript. 23 Class is used to call methods Get,Set,Update of Settings object from JavaScript.
9 When url is local page "user_mysettings.html", after document is loaded, C++ cre ates Settings object in page's JavaScript. 24 When url is local page "user_mysettings.html", after document is loaded, C++ cre ates Settings object in page's JavaScript.
10 Then var value = window.Settings.Get(par), window.Settings.Set(par, value), wind ow.Settings.Update() can be called from JavaScript 25 Then var value = window.Settings.Get(par), window.Settings.Set(par, value), wind ow.Settings.Update() can be called from JavaScript
11 */ 26 */
12 class CPluginUserSettings: public IDispatch 27 class CPluginUserSettings: public IDispatch
13 { 28 {
14 public: 29 public:
15 CPluginUserSettings() // = default;
16 {
17 }
18
19 // IUnknown 30 // IUnknown
20 STDMETHOD(QueryInterface)(REFIID riid, void **ppvObj); 31 STDMETHOD(QueryInterface)(REFIID riid, void **ppvObj);
21 ULONG __stdcall AddRef(); 32 ULONG __stdcall AddRef();
22 ULONG __stdcall Release(); 33 ULONG __stdcall Release();
23 34
24 // IDispatch 35 // IDispatch
25 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo); 36 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo);
26 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo); 37 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo);
27 STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID l cid, DISPID* rgdispid); 38 STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID l cid, DISPID* rgdispid);
28 STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DI SPPARAMS* pDispparams, VARIANT* pVarResult, 39 STDMETHOD(Invoke)(DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DI SPPARAMS* pDispparams, VARIANT* pVarResult,
29 EXCEPINFO* pExcepinfo, UINT* pArgErr); 40 EXCEPINFO* pExcepinfo, UINT* pArgErr);
30 }; 41 };
31 42
32 #endif 43 #endif
LEFTRIGHT

Powered by Google App Engine
This is Rietveld