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/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 gfx::NativeViewAccessible View::GetNativeViewAccessible() { |
| 14 NOTIMPLEMENTED(); |
| 15 return NULL; |
| 16 } |
| 17 |
13 int View::GetHorizontalDragThreshold() { | 18 int View::GetHorizontalDragThreshold() { |
14 static bool determined_threshold = false; | 19 static bool determined_threshold = false; |
15 static int drag_threshold = 8; | 20 static int drag_threshold = 8; |
16 if (determined_threshold) | 21 if (determined_threshold) |
17 return drag_threshold; | 22 return drag_threshold; |
18 determined_threshold = true; | 23 determined_threshold = true; |
19 GtkSettings* settings = gtk_settings_get_default(); | 24 GtkSettings* settings = gtk_settings_get_default(); |
20 if (!settings) | 25 if (!settings) |
21 return drag_threshold; | 26 return drag_threshold; |
22 int value = 0; | 27 int value = 0; |
23 g_object_get(G_OBJECT(settings), "gtk-dnd-drag-threshold", &value, NULL); | 28 g_object_get(G_OBJECT(settings), "gtk-dnd-drag-threshold", &value, NULL); |
24 if (value) | 29 if (value) |
25 drag_threshold = value; | 30 drag_threshold = value; |
26 return drag_threshold; | 31 return drag_threshold; |
27 } | 32 } |
28 | 33 |
29 int View::GetVerticalDragThreshold() { | 34 int View::GetVerticalDragThreshold() { |
30 // Vertical and horizontal drag threshold are the same in Gtk. | 35 // Vertical and horizontal drag threshold are the same in Gtk. |
31 return GetHorizontalDragThreshold(); | 36 return GetHorizontalDragThreshold(); |
32 } | 37 } |
33 | 38 |
34 } // namespace views | 39 } // namespace views |
OLD | NEW |