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

Side by Side Diff: compiled/bindings.cpp

Issue 29398655: Issue 5062 - [emscripten] Allow generation of custom bindings code (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Made the code slightly safer Created April 4, 2017, 2:25 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
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 class_<ActiveFilter,Filter>("ActiveFilter") 57 class_<ActiveFilter,Filter>("ActiveFilter")
58 .property("disabled", &ActiveFilter::GetDisabled, &ActiveFilter::SetDisabl ed) 58 .property("disabled", &ActiveFilter::GetDisabled, &ActiveFilter::SetDisabl ed)
59 .property("hitCount", &ActiveFilter::GetHitCount, &ActiveFilter::SetHitCou nt) 59 .property("hitCount", &ActiveFilter::GetHitCount, &ActiveFilter::SetHitCou nt)
60 .property("lastHit", &ActiveFilter::GetLastHit, &ActiveFilter::SetLastHit) 60 .property("lastHit", &ActiveFilter::GetLastHit, &ActiveFilter::SetLastHit)
61 .function("isActiveOnDomain", &ActiveFilter::IsActiveOnDomain) 61 .function("isActiveOnDomain", &ActiveFilter::IsActiveOnDomain)
62 .function("isActiveOnlyOnDomain", &ActiveFilter::IsActiveOnlyOnDomain) 62 .function("isActiveOnlyOnDomain", &ActiveFilter::IsActiveOnlyOnDomain)
63 .function("isGeneric", &ActiveFilter::IsGeneric) 63 .function("isGeneric", &ActiveFilter::IsGeneric)
64 .function("serialize", &ActiveFilter::Serialize); 64 .function("serialize", &ActiveFilter::Serialize);
65 65
66 class_<RegExpFilter,ActiveFilter>("RegExpFilter") 66 class_<RegExpFilter,ActiveFilter>("RegExpFilter")
67 .function("matches", &RegExpFilter::Matches) 67 .function("matches", &RegExpFilter::Matches);
68 .class_initializer(&RegExpFilter::InitJSTypes); 68
69 custom_generator(&RegExpFilter::GenerateCustomBindings);
69 70
70 class_<BlockingFilter,RegExpFilter>("BlockingFilter") 71 class_<BlockingFilter,RegExpFilter>("BlockingFilter")
71 .class_property("type", "'blocking'"); 72 .class_property("type", "'blocking'");
72 73
73 class_<WhitelistFilter,RegExpFilter>("WhitelistFilter") 74 class_<WhitelistFilter,RegExpFilter>("WhitelistFilter")
74 .class_property("type", "'whitelist'"); 75 .class_property("type", "'whitelist'");
75 76
76 class_<ElemHideBase,ActiveFilter>("ElemHideBase") 77 class_<ElemHideBase,ActiveFilter>("ElemHideBase")
77 .property("selector", &ElemHideBase::GetSelector) 78 .property("selector", &ElemHideBase::GetSelector)
78 .property("selectorDomain", &ElemHideBase::GetSelectorDomain); 79 .property("selectorDomain", &ElemHideBase::GetSelectorDomain);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 .property("softExpiration", &DownloadableSubscription::GetSoftExpiration, &DownloadableSubscription::SetSoftExpiration) 117 .property("softExpiration", &DownloadableSubscription::GetSoftExpiration, &DownloadableSubscription::SetSoftExpiration)
117 .property("lastDownload", &DownloadableSubscription::GetLastDownload, &Dow nloadableSubscription::SetLastDownload) 118 .property("lastDownload", &DownloadableSubscription::GetLastDownload, &Dow nloadableSubscription::SetLastDownload)
118 .property("downloadStatus", &DownloadableSubscription::GetDownloadStatus, &DownloadableSubscription::SetDownloadStatus) 119 .property("downloadStatus", &DownloadableSubscription::GetDownloadStatus, &DownloadableSubscription::SetDownloadStatus)
119 .property("lastSuccess", &DownloadableSubscription::GetLastSuccess, &Downl oadableSubscription::SetLastSuccess) 120 .property("lastSuccess", &DownloadableSubscription::GetLastSuccess, &Downl oadableSubscription::SetLastSuccess)
120 .property("errors", &DownloadableSubscription::GetErrorCount, &Downloadabl eSubscription::SetErrorCount) 121 .property("errors", &DownloadableSubscription::GetErrorCount, &Downloadabl eSubscription::SetErrorCount)
121 .property("version", &DownloadableSubscription::GetDataRevision, &Download ableSubscription::SetDataRevision) 122 .property("version", &DownloadableSubscription::GetDataRevision, &Download ableSubscription::SetDataRevision)
122 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersion , &DownloadableSubscription::SetRequiredVersion) 123 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersion , &DownloadableSubscription::SetRequiredVersion)
123 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &D ownloadableSubscription::SetDownloadCount) 124 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &D ownloadableSubscription::SetDownloadCount)
124 .function("serialize", &DownloadableSubscription::Serialize); 125 .function("serialize", &DownloadableSubscription::Serialize);
125 } 126 }
OLDNEW
« no previous file with comments | « compile ('k') | compiled/bindings.ipp » ('j') | compiled/filter/RegExpFilter.cpp » ('J')

Powered by Google App Engine
This is Rietveld