benjamin@webkit.org | 74bde2b | 2015-01-09 01:56:00 +0000 | [diff] [blame] | 1 | /* |
weinig@apple.com | 91defc8 | 2015-01-18 21:54:12 +0000 | [diff] [blame] | 2 | * Copyright (C) 2015 Apple Inc. All rights reserved. |
benjamin@webkit.org | 74bde2b | 2015-01-09 01:56:00 +0000 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
weinig@apple.com | 963c96a | 2015-03-07 02:41:44 +0000 | [diff] [blame] | 26 | #ifndef WebCompiledContentExtensionData_h |
| 27 | #define WebCompiledContentExtensionData_h |
benjamin@webkit.org | 74bde2b | 2015-01-09 01:56:00 +0000 | [diff] [blame] | 28 | |
weinig@apple.com | 963c96a | 2015-03-07 02:41:44 +0000 | [diff] [blame] | 29 | #if ENABLE(CONTENT_EXTENSIONS) |
benjamin@webkit.org | 74bde2b | 2015-01-09 01:56:00 +0000 | [diff] [blame] | 30 | |
achristensen@apple.com | 7b68e7c | 2015-04-13 17:54:22 +0000 | [diff] [blame] | 31 | #include "NetworkCacheData.h" |
weinig@apple.com | 14840e3 | 2015-03-08 21:32:50 +0000 | [diff] [blame] | 32 | #include "SharedMemory.h" |
| 33 | #include <wtf/RefPtr.h> |
weinig@apple.com | 963c96a | 2015-03-07 02:41:44 +0000 | [diff] [blame] | 34 | |
| 35 | namespace IPC { |
| 36 | class ArgumentDecoder; |
| 37 | class ArgumentEncoder; |
benjamin@webkit.org | 74bde2b | 2015-01-09 01:56:00 +0000 | [diff] [blame] | 38 | } |
| 39 | |
weinig@apple.com | 963c96a | 2015-03-07 02:41:44 +0000 | [diff] [blame] | 40 | namespace WebKit { |
| 41 | |
| 42 | class WebCompiledContentExtensionData { |
| 43 | public: |
weinig@apple.com | 14840e3 | 2015-03-08 21:32:50 +0000 | [diff] [blame] | 44 | WebCompiledContentExtensionData() |
| 45 | { |
| 46 | } |
| 47 | |
commit-queue@webkit.org | 6124986 | 2015-05-11 19:54:15 +0000 | [diff] [blame] | 48 | WebCompiledContentExtensionData(RefPtr<SharedMemory>&& data, NetworkCache::Data fileData, unsigned actionsOffset, unsigned actionsSize, unsigned filtersWithoutDomainsBytecodeOffset, unsigned filtersWithoutDomainsBytecodeSize, unsigned filtersWithDomainsBytecodeOffset, unsigned filtersWithDomainsBytecodeSize, unsigned domainFiltersBytecodeOffset, unsigned domainFiltersBytecodeSize) |
aestes@apple.com | 13aae08 | 2016-01-02 08:03:08 +0000 | [diff] [blame] | 49 | : data(WTFMove(data)) |
achristensen@apple.com | 7b68e7c | 2015-04-13 17:54:22 +0000 | [diff] [blame] | 50 | , fileData(fileData) |
weinig@apple.com | 14840e3 | 2015-03-08 21:32:50 +0000 | [diff] [blame] | 51 | , actionsOffset(actionsOffset) |
| 52 | , actionsSize(actionsSize) |
commit-queue@webkit.org | 6124986 | 2015-05-11 19:54:15 +0000 | [diff] [blame] | 53 | , filtersWithoutDomainsBytecodeOffset(filtersWithoutDomainsBytecodeOffset) |
| 54 | , filtersWithoutDomainsBytecodeSize(filtersWithoutDomainsBytecodeSize) |
| 55 | , filtersWithDomainsBytecodeOffset(filtersWithDomainsBytecodeOffset) |
| 56 | , filtersWithDomainsBytecodeSize(filtersWithDomainsBytecodeSize) |
| 57 | , domainFiltersBytecodeOffset(domainFiltersBytecodeOffset) |
| 58 | , domainFiltersBytecodeSize(domainFiltersBytecodeSize) |
weinig@apple.com | 14840e3 | 2015-03-08 21:32:50 +0000 | [diff] [blame] | 59 | { |
| 60 | } |
| 61 | |
weinig@apple.com | 963c96a | 2015-03-07 02:41:44 +0000 | [diff] [blame] | 62 | void encode(IPC::ArgumentEncoder&) const; |
| 63 | static bool decode(IPC::ArgumentDecoder&, WebCompiledContentExtensionData&); |
| 64 | |
weinig@apple.com | 14840e3 | 2015-03-08 21:32:50 +0000 | [diff] [blame] | 65 | RefPtr<SharedMemory> data; |
achristensen@apple.com | 7b68e7c | 2015-04-13 17:54:22 +0000 | [diff] [blame] | 66 | NetworkCache::Data fileData; |
weinig@apple.com | 14840e3 | 2015-03-08 21:32:50 +0000 | [diff] [blame] | 67 | unsigned actionsOffset { 0 }; |
| 68 | unsigned actionsSize { 0 }; |
commit-queue@webkit.org | 6124986 | 2015-05-11 19:54:15 +0000 | [diff] [blame] | 69 | unsigned filtersWithoutDomainsBytecodeOffset { 0 }; |
| 70 | unsigned filtersWithoutDomainsBytecodeSize { 0 }; |
| 71 | unsigned filtersWithDomainsBytecodeOffset { 0 }; |
| 72 | unsigned filtersWithDomainsBytecodeSize { 0 }; |
| 73 | unsigned domainFiltersBytecodeOffset { 0 }; |
| 74 | unsigned domainFiltersBytecodeSize { 0 }; |
weinig@apple.com | 963c96a | 2015-03-07 02:41:44 +0000 | [diff] [blame] | 75 | }; |
| 76 | |
weinig@apple.com | 91defc8 | 2015-01-18 21:54:12 +0000 | [diff] [blame] | 77 | } |
benjamin@webkit.org | 74bde2b | 2015-01-09 01:56:00 +0000 | [diff] [blame] | 78 | |
weinig@apple.com | 963c96a | 2015-03-07 02:41:44 +0000 | [diff] [blame] | 79 | #endif // ENABLE(CONTENT_EXTENSIONS) |
| 80 | #endif // WebCompiledContentExtensionData_h |