Revert of Disable smoothness.top_25_smooth on win/mac/linux. (patchset #1 id:1 of...
[chromium-blink-merge.git] / ui / views / metrics_aura.cc
blob046baa892ca1196d2365f223d1172a6125a49976
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
3 // found in the LICENSE file.
5 #include "ui/views/metrics.h"
7 #if defined(OS_WIN)
8 #include <windows.h>
9 #endif
11 namespace {
13 // Default double click interval in milliseconds.
14 const int kDefaultDoubleClickInterval = 500;
16 } // namespace
18 namespace views {
20 int GetDoubleClickInterval() {
21 #if defined(OS_WIN)
22 return ::GetDoubleClickTime();
23 #else
24 // TODO(jennyz): This value may need to be adjusted on different platforms.
25 return kDefaultDoubleClickInterval;
26 #endif
29 int GetMenuShowDelay() {
30 #if defined(OS_WIN)
31 static DWORD delay = 0;
32 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0))
33 delay = kDefaultMenuShowDelay;
34 return delay;
35 #else
36 return 0;
37 #endif
40 } // namespace views