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 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 | 12 |
13 int GetDoubleClickInterval() { | 13 int GetDoubleClickInterval() { |
14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
15 return ::GetDoubleClickTime(); | 15 return ::GetDoubleClickTime(); |
16 #else | 16 #else |
17 return 5; | 17 // Use the default double click interval value on gtk. |
oshima
2011/11/11 01:52:32
ditto
| |
18 // TODO(jennyz): This value may need to be adjusted on different platform. | |
19 return 500; | |
18 #endif | 20 #endif |
19 } | 21 } |
20 | 22 |
21 int GetMenuShowDelay() { | 23 int GetMenuShowDelay() { |
22 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
23 static DWORD delay = 0; | 25 static DWORD delay = 0; |
24 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) | 26 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) |
25 delay = kDefaultMenuShowDelay; | 27 delay = kDefaultMenuShowDelay; |
26 return delay; | 28 return delay; |
27 #else | 29 #else |
28 return 0; | 30 return 0; |
29 #endif | 31 #endif |
30 } | 32 } |
31 | 33 |
32 } // namespace views | 34 } // namespace views |
OLD | NEW |