| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "views/metrics.h" | 5 #include "views/metrics.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) |
| 7 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif |
| 8 | 10 |
| 9 namespace views { | 11 namespace views { |
| 10 | 12 |
| 11 int GetDoubleClickInterval() { | 13 int GetDoubleClickInterval() { |
| 12 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 13 return ::GetDoubleClickTime(); | 15 return ::GetDoubleClickTime(); |
| 14 #else | 16 #else |
| 15 return 5; | 17 return 5; |
| 16 #endif | 18 #endif |
| 17 } | 19 } |
| 18 | 20 |
| 19 int GetMenuShowDelay() { | 21 int GetMenuShowDelay() { |
| 20 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
| 21 static DWORD delay = 0; | 23 static DWORD delay = 0; |
| 22 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) | 24 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) |
| 23 delay = kDefaultMenuShowDelay; | 25 delay = kDefaultMenuShowDelay; |
| 24 return delay; | 26 return delay; |
| 25 #else | 27 #else |
| 26 return 0; | 28 return 0; |
| 27 #endif; | 29 #endif |
| 28 } | 30 } |
| 29 | 31 |
| 30 } // namespace views | 32 } // namespace views |
| OLD | NEW |