gfx/angle/src/compiler/DirectiveHandler.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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.

     1 //
     2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
     3 // Use of this source code is governed by a BSD-style license that can be
     4 // found in the LICENSE file.
     5 //
     7 #ifndef COMPILER_DIRECTIVE_HANDLER_H_
     8 #define COMPILER_DIRECTIVE_HANDLER_H_
    10 #include "compiler/ExtensionBehavior.h"
    11 #include "compiler/Pragma.h"
    12 #include "compiler/preprocessor/DirectiveHandlerBase.h"
    14 class TDiagnostics;
    16 class TDirectiveHandler : public pp::DirectiveHandler
    17 {
    18   public:
    19     TDirectiveHandler(TExtensionBehavior& extBehavior,
    20                       TDiagnostics& diagnostics);
    21     virtual ~TDirectiveHandler();
    23     const TPragma& pragma() const { return mPragma; }
    24     const TExtensionBehavior& extensionBehavior() const { return mExtensionBehavior; }
    26     virtual void handleError(const pp::SourceLocation& loc,
    27                              const std::string& msg);
    29     virtual void handlePragma(const pp::SourceLocation& loc,
    30                               const std::string& name,
    31                               const std::string& value);
    33     virtual void handleExtension(const pp::SourceLocation& loc,
    34                                  const std::string& name,
    35                                  const std::string& behavior);
    37     virtual void handleVersion(const pp::SourceLocation& loc,
    38                                int version);
    40   private:
    41     TPragma mPragma;
    42     TExtensionBehavior& mExtensionBehavior;
    43     TDiagnostics& mDiagnostics;
    44 };
    46 #endif  // COMPILER_DIRECTIVE_HANDLER_H_

mercurial