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

Side by Side Diff: views/view_gtk.cc

Issue 216045: Implements a NOTIMPLEMENTED in GoButton. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months 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 | « views/view.h ('k') | views/view_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/view.h" 5 #include "views/view.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 // static
14 int View::GetDoubleClickTimeMS() {
15 GdkDisplay* display = gdk_display_get_default();
16 return display ? display->double_click_time : 500;
17 }
18
13 ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() { 19 ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() {
14 NOTIMPLEMENTED(); 20 NOTIMPLEMENTED();
15 return NULL; 21 return NULL;
16 } 22 }
17 23
18 int View::GetHorizontalDragThreshold() { 24 int View::GetHorizontalDragThreshold() {
19 static bool determined_threshold = false; 25 static bool determined_threshold = false;
20 static int drag_threshold = 8; 26 static int drag_threshold = 8;
21 if (determined_threshold) 27 if (determined_threshold)
22 return drag_threshold; 28 return drag_threshold;
23 determined_threshold = true; 29 determined_threshold = true;
24 GtkSettings* settings = gtk_settings_get_default(); 30 GtkSettings* settings = gtk_settings_get_default();
25 if (!settings) 31 if (!settings)
26 return drag_threshold; 32 return drag_threshold;
27 int value = 0; 33 int value = 0;
28 g_object_get(G_OBJECT(settings), "gtk-dnd-drag-threshold", &value, NULL); 34 g_object_get(G_OBJECT(settings), "gtk-dnd-drag-threshold", &value, NULL);
29 if (value) 35 if (value)
30 drag_threshold = value; 36 drag_threshold = value;
31 return drag_threshold; 37 return drag_threshold;
32 } 38 }
33 39
34 int View::GetVerticalDragThreshold() { 40 int View::GetVerticalDragThreshold() {
35 // Vertical and horizontal drag threshold are the same in Gtk. 41 // Vertical and horizontal drag threshold are the same in Gtk.
36 return GetHorizontalDragThreshold(); 42 return GetHorizontalDragThreshold();
37 } 43 }
38 44
39 } // namespace views 45 } // namespace views
OLDNEW
« no previous file with comments | « views/view.h ('k') | views/view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698