Index: content/test/layout_tests/runner/KeyCodeMapping.h |
diff --git a/third_party/tcmalloc/chromium/src/base/spinlock_internal.h b/content/test/layout_tests/runner/KeyCodeMapping.h |
similarity index 55% |
copy from third_party/tcmalloc/chromium/src/base/spinlock_internal.h |
copy to content/test/layout_tests/runner/KeyCodeMapping.h |
index 44942609f40a87492a7aeed0068a5e27bf9cd157..2b9f697290758610ef2d73970d962727b5dd9d1f 100644 |
--- a/third_party/tcmalloc/chromium/src/base/spinlock_internal.h |
+++ b/content/test/layout_tests/runner/KeyCodeMapping.h |
@@ -1,5 +1,9 @@ |
-/* Copyright (c) 2010, Google Inc. |
- * All rights reserved. |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/* |
+ * Copyright (C) 2012 Google Inc. All rights reserved. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are |
@@ -26,39 +30,42 @@ |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
- * |
- * --- |
- * This file is an internal part spinlock.cc and once.cc |
- * It may not be used directly by code outside of //base. |
*/ |
-#ifndef BASE_SPINLOCK_INTERNAL_H_ |
-#define BASE_SPINLOCK_INTERNAL_H_ |
+#ifndef KeyCodeMapping_h |
+#define KeyCodeMapping_h |
-#include <config.h> |
-#include "base/basictypes.h" |
-#include "base/atomicops.h" |
+namespace WebTestRunner { |
-namespace base { |
-namespace internal { |
- |
-// SpinLockWait() waits until it can perform one of several transitions from |
-// "from" to "to". It returns when it performs a transition where done==true. |
-struct SpinLockWaitTransition { |
- int32 from; |
- int32 to; |
- bool done; |
+// The keycodes match the values of the virtual keycodes found here http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx |
+enum { |
+ VKEY_RETURN = 0x0D, |
+ VKEY_ESCAPE = 0x1B, |
+ VKEY_PRIOR = 0x21, |
+ VKEY_NEXT = 0x22, |
+ VKEY_END = 0x23, |
+ VKEY_HOME = 0x24, |
+ VKEY_LEFT = 0x25, |
+ VKEY_UP = 0x26, |
+ VKEY_RIGHT = 0x27, |
+ VKEY_DOWN = 0x28, |
+ VKEY_SNAPSHOT = 0x2C, |
+ VKEY_INSERT = 0x2D, |
+ VKEY_DELETE = 0x2E, |
+ VKEY_APPS = 0x5D, |
+ VKEY_F1 = 0x70, |
+ VKEY_NUMLOCK = 0x90, |
+ VKEY_LSHIFT = 0xA0, |
+ VKEY_RSHIFT = 0xA1, |
+ VKEY_LCONTROL = 0xA2, |
+ VKEY_RCONTROL = 0xA3, |
+ VKEY_LMENU = 0xA4, |
+ VKEY_RMENU = 0xA5, |
}; |
-// Wait until *w can transition from trans[i].from to trans[i].to for some i |
-// satisfying 0<=i<n && trans[i].done, atomically make the transition, |
-// then return the old value of *w. Make any other atomic tranistions |
-// where !trans[i].done, but continue waiting. |
-int32 SpinLockWait(volatile Atomic32 *w, int n, |
- const SpinLockWaitTransition trans[]); |
-void SpinLockWake(volatile Atomic32 *w, bool all); |
-void SpinLockDelay(volatile Atomic32 *w, int32 value, int loop); |
+// Map a windows keycode to a native keycode on defined(__linux__) && defined(TOOLKIT_GTK). |
+int NativeKeyCodeForWindowsKeyCode(int keysym); |
+ |
+} |
-} // namespace internal |
-} // namespace base |
-#endif |
+#endif // KeyCodeMapping_h |