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

Unified Diff: compiled/subscription/Subscription.h

Issue 29425555: Issue 5201 - [emscripten] Replace EM_ASM calls by a custom JavaScript library (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Abstracted away all Emscripten dependencies Created May 3, 2017, 11:54 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/subscription/DownloadableSubscription.h ('k') | compiled/subscription/UserDefinedSubscription.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/subscription/Subscription.h
===================================================================
--- a/compiled/subscription/Subscription.h
+++ b/compiled/subscription/Subscription.h
@@ -20,26 +20,27 @@
#include <type_traits>
#include <vector>
#include "../filter/Filter.h"
#include "../String.h"
#include "../FilterNotifier.h"
#include "../intrusive_ptr.h"
#include "../debug.h"
+#include "../bindings/runtime.h"
#define SUBSCRIPTION_PROPERTY_INTERNAL(field_type, param_type, name, topic, getter, setter) \
private:\
field_type name;\
public:\
- param_type EMSCRIPTEN_KEEPALIVE getter() const\
+ param_type BINDINGS_EXPORTED getter() const\
{\
return name;\
}\
- void EMSCRIPTEN_KEEPALIVE setter(param_type value)\
+ void BINDINGS_EXPORTED setter(param_type value)\
{\
if (name != value)\
{\
name = value;\
if (FilterNotifier::Topic::topic != FilterNotifier::Topic::NONE)\
{\
FilterNotifier::SubscriptionChange(FilterNotifier::Topic::topic,\
this);\
@@ -68,31 +69,31 @@ public:
USERDEFINED = 2
};
explicit Subscription(Type type, const String& id);
~Subscription();
Type mType;
- EMSCRIPTEN_KEEPALIVE const String& GetID() const
+ BINDINGS_EXPORTED const String& GetID() const
{
return mID;
}
SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle);
SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED,
GetDisabled, SetDisabled);
- EMSCRIPTEN_KEEPALIVE unsigned GetFilterCount() const
+ BINDINGS_EXPORTED unsigned GetFilterCount() const
{
return mFilters.size();
}
- EMSCRIPTEN_KEEPALIVE Filter* FilterAt(unsigned index);
- EMSCRIPTEN_KEEPALIVE int IndexOfFilter(Filter* filter);
- EMSCRIPTEN_KEEPALIVE OwnedString Serialize() const;
- EMSCRIPTEN_KEEPALIVE OwnedString SerializeFilters() const;
+ BINDINGS_EXPORTED Filter* FilterAt(unsigned index);
+ BINDINGS_EXPORTED int IndexOfFilter(Filter* filter);
+ BINDINGS_EXPORTED OwnedString Serialize() const;
+ BINDINGS_EXPORTED OwnedString SerializeFilters() const;
- static EMSCRIPTEN_KEEPALIVE Subscription* FromID(const String& id);
+ static BINDINGS_EXPORTED Subscription* FromID(const String& id);
};
typedef intrusive_ptr<Subscription> SubscriptionPtr;
« no previous file with comments | « compiled/subscription/DownloadableSubscription.h ('k') | compiled/subscription/UserDefinedSubscription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld