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

Side by Side Diff: include/AdblockPlus/Notification.h

Issue 29420561: Noissue - don't inherit JsValue derived from std::enable_shared_from_this (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created April 24, 2017, 8:26 a.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 | « include/AdblockPlus/FilterEngine.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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 30 matching lines...) Expand all
41 */ 41 */
42 struct NotificationTexts 42 struct NotificationTexts
43 { 43 {
44 std::string title; 44 std::string title;
45 std::string message; 45 std::string message;
46 }; 46 };
47 47
48 /** 48 /**
49 * Wrapper for an Adblock Plus notification object. 49 * Wrapper for an Adblock Plus notification object.
50 */ 50 */
51 class Notification: public JsValue, 51 class Notification: public JsValue
52 public std::enable_shared_from_this<Notification>
53 { 52 {
54 friend class FilterEngine; 53 friend class FilterEngine;
55 protected: 54 protected:
56 /** 55 /**
57 * Constructor. 56 * Constructor.
58 * @param jsValue `JsValue&&` notification JavaScript object. 57 * @param jsValue `JsValue&&` notification JavaScript object.
59 */ 58 */
60 explicit Notification(JsValue&& jsValue); 59 explicit Notification(JsValue&& jsValue);
61 public: 60 public:
62 /** 61 /**
(...skipping 18 matching lines...) Expand all
81 * Marks this notification as shown. It is only relevant for question 80 * Marks this notification as shown. It is only relevant for question
82 * notifications. Other notifications are marked automatically. 81 * notifications. Other notifications are marked automatically.
83 */ 82 */
84 void MarkAsShown(); 83 void MarkAsShown();
85 private: 84 private:
86 }; 85 };
87 typedef std::shared_ptr<Notification> NotificationPtr; 86 typedef std::shared_ptr<Notification> NotificationPtr;
88 } 87 }
89 88
90 #endif 89 #endif
OLDNEW
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld