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

Side by Side Diff: views/view_gtk.cc

Issue 570014: Adding drag-drop support in and out of the Browser Action overflow menu.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 13 // static
14 int View::GetDoubleClickTimeMS() { 14 int View::GetDoubleClickTimeMS() {
15 GdkDisplay* display = gdk_display_get_default(); 15 GdkDisplay* display = gdk_display_get_default();
16 return display ? display->double_click_time : 500; 16 return display ? display->double_click_time : 500;
17 } 17 }
18 18
19 int View::GetMenuShowDelay() {
20 return kShowFolderDropMenuDelay;
21 }
22
19 ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() { 23 ViewAccessibilityWrapper* View::GetViewAccessibilityWrapper() {
20 NOTIMPLEMENTED(); 24 NOTIMPLEMENTED();
21 return NULL; 25 return NULL;
22 } 26 }
23 27
24 int View::GetHorizontalDragThreshold() { 28 int View::GetHorizontalDragThreshold() {
25 static bool determined_threshold = false; 29 static bool determined_threshold = false;
26 static int drag_threshold = 8; 30 static int drag_threshold = 8;
27 if (determined_threshold) 31 if (determined_threshold)
28 return drag_threshold; 32 return drag_threshold;
29 determined_threshold = true; 33 determined_threshold = true;
30 GtkSettings* settings = gtk_settings_get_default(); 34 GtkSettings* settings = gtk_settings_get_default();
31 if (!settings) 35 if (!settings)
32 return drag_threshold; 36 return drag_threshold;
33 int value = 0; 37 int value = 0;
34 g_object_get(G_OBJECT(settings), "gtk-dnd-drag-threshold", &value, NULL); 38 g_object_get(G_OBJECT(settings), "gtk-dnd-drag-threshold", &value, NULL);
35 if (value) 39 if (value)
36 drag_threshold = value; 40 drag_threshold = value;
37 return drag_threshold; 41 return drag_threshold;
38 } 42 }
39 43
40 int View::GetVerticalDragThreshold() { 44 int View::GetVerticalDragThreshold() {
41 // Vertical and horizontal drag threshold are the same in Gtk. 45 // Vertical and horizontal drag threshold are the same in Gtk.
42 return GetHorizontalDragThreshold(); 46 return GetHorizontalDragThreshold();
43 } 47 }
44 48
45 } // namespace views 49 } // namespace views
OLDNEW
« views/view.h ('K') | « views/view.cc ('k') | views/view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698