OLD | NEW |
1 // Copyright (c) 2010 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 #include "views/views_delegate.h" | 10 #include "views/views_delegate.h" |
11 | 11 |
12 namespace views { | 12 namespace views { |
13 | 13 |
14 // static | 14 // static |
15 int View::GetDoubleClickTimeMS() { | 15 int View::GetDoubleClickTimeMS() { |
16 GdkDisplay* display = gdk_display_get_default(); | 16 GdkDisplay* display = gdk_display_get_default(); |
17 return display ? display->double_click_time : 500; | 17 return display ? display->double_click_time : 500; |
18 } | 18 } |
19 | 19 |
20 int View::GetMenuShowDelay() { | 20 int View::GetMenuShowDelay() { |
21 return kShowFolderDropMenuDelay; | 21 return kShowFolderDropMenuDelay; |
22 } | 22 } |
23 | 23 |
24 void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type) { | |
25 NotifyAccessibilityEvent(event_type, true); | |
26 } | |
27 | |
28 void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type, | 24 void View::NotifyAccessibilityEvent(AccessibilityTypes::Event event_type, |
29 bool send_native_event) { | 25 bool send_native_event) { |
30 // Send the notification to the delegate. | 26 // Send the notification to the delegate. |
31 if (ViewsDelegate::views_delegate) | 27 if (ViewsDelegate::views_delegate) |
32 ViewsDelegate::views_delegate->NotifyAccessibilityEvent(this, event_type); | 28 ViewsDelegate::views_delegate->NotifyAccessibilityEvent(this, event_type); |
33 | 29 |
34 // In the future if we add native GTK accessibility support, the | 30 // In the future if we add native GTK accessibility support, the |
35 // notification should be sent here. | 31 // notification should be sent here. |
36 } | 32 } |
37 | 33 |
(...skipping 17 matching lines...) Expand all Loading... |
55 drag_threshold = value; | 51 drag_threshold = value; |
56 return drag_threshold; | 52 return drag_threshold; |
57 } | 53 } |
58 | 54 |
59 int View::GetVerticalDragThreshold() { | 55 int View::GetVerticalDragThreshold() { |
60 // Vertical and horizontal drag threshold are the same in Gtk. | 56 // Vertical and horizontal drag threshold are the same in Gtk. |
61 return GetHorizontalDragThreshold(); | 57 return GetHorizontalDragThreshold(); |
62 } | 58 } |
63 | 59 |
64 } // namespace views | 60 } // namespace views |
OLD | NEW |