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.
2 /*
3 * Copyright 2011 Google Inc.
4 *
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 */
8 #include "X11/Xlib.h"
9 #include "X11/keysym.h"
11 #include "SkKey.h"
13 #ifndef XKEYS_TOSKKEYS_H
14 #define XKEYS_TOSKKEYS_H
16 SkKey XKeyToSkKey(KeySym keysym) {
17 switch (keysym) {
18 case XK_BackSpace:
19 return kBack_SkKey;
20 case XK_Return:
21 return kOK_SkKey;
22 case XK_Home:
23 return kHome_SkKey;
24 case XK_End:
25 return kEnd_SkKey;
26 case XK_Right:
27 return kRight_SkKey;
28 case XK_Left:
29 return kLeft_SkKey;
30 case XK_Down:
31 return kDown_SkKey;
32 case XK_Up:
33 return kUp_SkKey;
34 default:
35 return kNONE_SkKey;
36 }
37 }
38 #endif