Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 * Platform constructor. | 88 * Platform constructor. |
89 * | 89 * |
90 * When a parameter value is nullptr the corresponding default | 90 * When a parameter value is nullptr the corresponding default |
91 * implementation is chosen. | 91 * implementation is chosen. |
92 */ | 92 */ |
93 explicit Platform(CreationParameters&& creationParameters = CreationParamete rs()); | 93 explicit Platform(CreationParameters&& creationParameters = CreationParamete rs()); |
94 ~Platform(); | 94 ~Platform(); |
95 | 95 |
96 /** | 96 /** |
97 * Ensures that JsEngine is constructed. If JsEngine is already present | 97 * Ensures that JsEngine is constructed. If JsEngine is already present |
98 * then the parameters areignored. | 98 * then the parameters are ignored. |
hub
2017/08/25 13:20:39
typo: 'are ignored'
sergei
2017/08/25 15:02:53
Done.
| |
99 * | 99 * |
100 * @param appInfo Information about the app, | 100 * @param appInfo Information about the app, |
101 * @param isolate A provider of v8::Isolate, if the value is nullptr then | 101 * @param isolate A provider of v8::Isolate, if the value is nullptr then |
102 * a default implementation is used. | 102 * a default implementation is used. |
103 */ | 103 */ |
104 void SetUpJsEngine(const AppInfo& appInfo = AppInfo(), std::unique_ptr<IV8Is olateProvider> isolate = nullptr); | 104 void SetUpJsEngine(const AppInfo& appInfo = AppInfo(), std::unique_ptr<IV8Is olateProvider> isolate = nullptr); |
105 | 105 |
106 /** | 106 /** |
107 * Retrieves the `JsEngine` instance. It calls SetUpJsEngine if JsEngine is | 107 * Retrieves the `JsEngine` instance. It calls SetUpJsEngine if JsEngine is |
108 * not initialized yet. | 108 * not initialized yet. |
(...skipping 27 matching lines...) Expand all Loading... | |
136 * @return The asynchronous IFileSystem implementation. | 136 * @return The asynchronous IFileSystem implementation. |
137 */ | 137 */ |
138 IFileSystem& GetFileSystem(); | 138 IFileSystem& GetFileSystem(); |
139 | 139 |
140 /** | 140 /** |
141 * @return The asynchronous IWebRequest implementation. | 141 * @return The asynchronous IWebRequest implementation. |
142 */ | 142 */ |
143 IWebRequest& GetWebRequest(); | 143 IWebRequest& GetWebRequest(); |
144 | 144 |
145 /** | 145 /** |
146 * @see `SetLogSystem()`. | 146 * @return The LogSystem implementation. |
147 */ | 147 */ |
148 LogSystem& GetLogSystem(); | 148 LogSystem& GetLogSystem(); |
149 | 149 |
150 private: | 150 private: |
151 LogSystemPtr logSystem; | 151 LogSystemPtr logSystem; |
152 TimerPtr timer; | 152 TimerPtr timer; |
153 FileSystemPtr fileSystem; | 153 FileSystemPtr fileSystem; |
154 WebRequestPtr webRequest; | 154 WebRequestPtr webRequest; |
155 // used for creation and deletion of modules. | 155 // used for creation and deletion of modules. |
156 std::mutex modulesMutex; | 156 std::mutex modulesMutex; |
157 std::shared_ptr<JsEngine> jsEngine; | 157 std::shared_ptr<JsEngine> jsEngine; |
158 std::shared_future<FilterEnginePtr> filterEngine; | 158 std::shared_future<FilterEnginePtr> filterEngine; |
159 }; | 159 }; |
160 } | 160 } |
161 | 161 |
162 #endif // ADBLOCK_PLUS_PLATFORM_H | 162 #endif // ADBLOCK_PLUS_PLATFORM_H |
LEFT | RIGHT |