Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: views/metrics_aura.cc

Issue 8524008: Fix the double/tripple click behavior of NataiveTextfieldViews objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address the code review comments. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | views/view_aura.cc » ('j') | views/view_aura.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 {
12 // Default double click interval in milliseconds.
sky 2011/11/10 21:37:03 nit: newline between 11 and 12.
jennyz 2011/11/10 21:47:25 Done.
13 // Use the default double click interval value on gtk.
14 const int kDefaultDoubleClickInterval = 500;
15
16 } // namespace
17
11 namespace views { 18 namespace views {
12 19
13 int GetDoubleClickInterval() { 20 int GetDoubleClickInterval() {
14 #if defined(OS_WIN) 21 #if defined(OS_WIN)
15 return ::GetDoubleClickTime(); 22 return ::GetDoubleClickTime();
16 #else 23 #else
17 return 5; 24 // TODO(jennyz): This value may need to be adjusted on different platforms.
25 return kDefaultDoubleClickInterval;
18 #endif 26 #endif
19 } 27 }
20 28
21 int GetMenuShowDelay() { 29 int GetMenuShowDelay() {
22 #if defined(OS_WIN) 30 #if defined(OS_WIN)
23 static DWORD delay = 0; 31 static DWORD delay = 0;
24 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0)) 32 if (!delay && !SystemParametersInfo(SPI_GETMENUSHOWDELAY, 0, &delay, 0))
25 delay = kDefaultMenuShowDelay; 33 delay = kDefaultMenuShowDelay;
26 return delay; 34 return delay;
27 #else 35 #else
28 return 0; 36 return 0;
29 #endif 37 #endif
30 } 38 }
31 39
32 } // namespace views 40 } // namespace views
OLDNEW
« no previous file with comments | « no previous file | views/view_aura.cc » ('j') | views/view_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698