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 | * Copyright 2009 Google Inc. |
michael@0 | 3 | * |
michael@0 | 4 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 5 | * found in the LICENSE file. |
michael@0 | 6 | */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef SkHarfBuzzFont_DEFINED |
michael@0 | 9 | #define SkHarfBuzzFont_DEFINED |
michael@0 | 10 | |
michael@0 | 11 | extern "C" { |
michael@0 | 12 | #include "harfbuzz-shaper.h" |
michael@0 | 13 | //#include "harfbuzz-unicode.h" |
michael@0 | 14 | } |
michael@0 | 15 | |
michael@0 | 16 | #include "SkTypes.h" |
michael@0 | 17 | |
michael@0 | 18 | class SkPaint; |
michael@0 | 19 | class SkTypeface; |
michael@0 | 20 | |
michael@0 | 21 | class SkHarfBuzzFont { |
michael@0 | 22 | public: |
michael@0 | 23 | /** The subclass returns the typeface for this font, or NULL |
michael@0 | 24 | */ |
michael@0 | 25 | virtual SkTypeface* getTypeface() const = 0; |
michael@0 | 26 | /** The subclass sets the text related attributes of the paint. |
michael@0 | 27 | e.g. textSize, typeface, textSkewX, etc. |
michael@0 | 28 | All of the attributes that could effect how the text is measured. |
michael@0 | 29 | Color information (e.g. color, xfermode, shader, etc.) are not required. |
michael@0 | 30 | */ |
michael@0 | 31 | virtual void setupPaint(SkPaint*) const = 0; |
michael@0 | 32 | |
michael@0 | 33 | /** Implementation of HB_GetFontTableFunc, using SkHarfBuzzFont* as |
michael@0 | 34 | the first parameter. |
michael@0 | 35 | */ |
michael@0 | 36 | static HB_Error GetFontTableFunc(void* skharfbuzzfont, const HB_Tag tag, |
michael@0 | 37 | HB_Byte* buffer, HB_UInt* len); |
michael@0 | 38 | |
michael@0 | 39 | static const HB_FontClass& GetFontClass(); |
michael@0 | 40 | }; |
michael@0 | 41 | |
michael@0 | 42 | #endif |