Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
michael@0 | 1 | |
michael@0 | 2 | /* |
michael@0 | 3 | * Copyright 2010 The Android Open Source Project |
michael@0 | 4 | * |
michael@0 | 5 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 6 | * found in the LICENSE file. |
michael@0 | 7 | */ |
michael@0 | 8 | |
michael@0 | 9 | |
michael@0 | 10 | #ifndef SkPDFFormXObject_DEFINED |
michael@0 | 11 | #define SkPDFFormXObject_DEFINED |
michael@0 | 12 | |
michael@0 | 13 | #include "SkPDFStream.h" |
michael@0 | 14 | #include "SkPDFTypes.h" |
michael@0 | 15 | #include "SkRect.h" |
michael@0 | 16 | #include "SkRefCnt.h" |
michael@0 | 17 | #include "SkPDFResourceDict.h" |
michael@0 | 18 | #include "SkString.h" |
michael@0 | 19 | |
michael@0 | 20 | class SkMatrix; |
michael@0 | 21 | class SkPDFDevice; |
michael@0 | 22 | class SkPDFCatalog; |
michael@0 | 23 | |
michael@0 | 24 | /** \class SkPDFFormXObject |
michael@0 | 25 | |
michael@0 | 26 | A form XObject; a self contained description of graphics objects. A form |
michael@0 | 27 | XObject is basically a page object with slightly different syntax, that |
michael@0 | 28 | can be drawn onto a page. |
michael@0 | 29 | */ |
michael@0 | 30 | |
michael@0 | 31 | // The caller could keep track of the form XObjects it creates and |
michael@0 | 32 | // canonicalize them, but the Skia API doesn't provide enough context to |
michael@0 | 33 | // automatically do it (trivially). |
michael@0 | 34 | class SkPDFFormXObject : public SkPDFStream { |
michael@0 | 35 | public: |
michael@0 | 36 | /** Create a PDF form XObject. Entries for the dictionary entries are |
michael@0 | 37 | * automatically added. |
michael@0 | 38 | * @param device The set of graphical elements on this form. |
michael@0 | 39 | */ |
michael@0 | 40 | explicit SkPDFFormXObject(SkPDFDevice* device); |
michael@0 | 41 | /** |
michael@0 | 42 | * Create a PDF form XObject from a raw content stream and associated |
michael@0 | 43 | * resources. |
michael@0 | 44 | */ |
michael@0 | 45 | explicit SkPDFFormXObject(SkStream* content, |
michael@0 | 46 | SkRect bbox, |
michael@0 | 47 | SkPDFResourceDict* resourceDict); |
michael@0 | 48 | virtual ~SkPDFFormXObject(); |
michael@0 | 49 | |
michael@0 | 50 | // The SkPDFObject interface. |
michael@0 | 51 | virtual void getResources(const SkTSet<SkPDFObject*>& knownResourceObjects, |
michael@0 | 52 | SkTSet<SkPDFObject*>* newResourceObjects); |
michael@0 | 53 | |
michael@0 | 54 | private: |
michael@0 | 55 | void init(const char* colorSpace, |
michael@0 | 56 | SkPDFDict* resourceDict, SkPDFArray* bbox); |
michael@0 | 57 | |
michael@0 | 58 | SkTSet<SkPDFObject*> fResources; |
michael@0 | 59 | }; |
michael@0 | 60 | |
michael@0 | 61 | #endif |