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

Side by Side Diff: src/plugin/PluginUserSettings.h

Issue 5979857238360064: Issues #1163, #1173 - refactor CPluginUserSettings (Closed)
Patch Set: Fixed defects involving pVarResult Created Feb. 2, 2015, 2:37 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
« no previous file with comments | « no previous file | src/plugin/PluginUserSettings.cpp » ('j') | src/plugin/PluginUserSettings.cpp » ('J')
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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 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/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 #ifndef PLUGIN_USER_SETTINGS_H
18 #define PLUGIN_USER_SETTINGS_H
17 19
18 #pragma once 20 #include <OAIdl.h>
19
20 #include <vector>
21 #include <utility>
22 21
23 /* 22 /*
24 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.
25 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.
26 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
27 */ 26 */
28 class CPluginUserSettings: public IDispatch 27 class CPluginUserSettings: public IDispatch
29 { 28 {
30 public: 29 public:
31 CPluginUserSettings();
32
33 // IUnknown 30 // IUnknown
34 STDMETHOD(QueryInterface)(REFIID riid, void **ppvObj); 31 STDMETHOD(QueryInterface)(REFIID riid, void **ppvObj);
35 ULONG __stdcall AddRef(); 32 ULONG __stdcall AddRef();
36 ULONG __stdcall Release(); 33 ULONG __stdcall Release();
37 34
38 // IDispatch 35 // IDispatch
39 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo); 36 STDMETHOD(GetTypeInfoCount)(UINT* pctinfo);
40 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo); 37 STDMETHOD(GetTypeInfo)(UINT itinfo, LCID lcid, ITypeInfo** pptinfo);
41 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);
42 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,
43 EXCEPINFO* pExcepinfo, UINT* pArgErr); 40 EXCEPINFO* pExcepinfo, UINT* pArgErr);
44 }; 41 };
42
43 #endif
OLDNEW
« no previous file with comments | « no previous file | src/plugin/PluginUserSettings.cpp » ('j') | src/plugin/PluginUserSettings.cpp » ('J')

Powered by Google App Engine
This is Rietveld