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 "chrome/browser/gtk/back_forward_button_gtk.h" | 5 #include "chrome/browser/gtk/back_forward_button_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "chrome/app/chrome_dll_resource.h" | 11 #include "chrome/app/chrome_command_ids.h" |
12 #include "chrome/browser/back_forward_menu_model.h" | 12 #include "chrome/browser/back_forward_menu_model.h" |
13 #include "chrome/browser/browser.h" | 13 #include "chrome/browser/browser.h" |
14 #include "chrome/browser/gtk/gtk_theme_provider.h" | 14 #include "chrome/browser/gtk/gtk_theme_provider.h" |
15 #include "chrome/browser/gtk/gtk_util.h" | 15 #include "chrome/browser/gtk/gtk_util.h" |
16 #include "chrome/browser/gtk/menu_gtk.h" | 16 #include "chrome/browser/gtk/menu_gtk.h" |
17 #include "chrome/browser/profile.h" | 17 #include "chrome/browser/profile.h" |
18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
19 #include "grit/theme_resources.h" | 19 #include "grit/theme_resources.h" |
20 | 20 |
21 // The time in milliseconds between when the user clicks and the menu appears. | 21 // The time in milliseconds between when the user clicks and the menu appears. |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 int drag_min_distance; | 125 int drag_min_distance; |
126 g_object_get(settings, "gtk-dnd-drag-threshold", &drag_min_distance, NULL); | 126 g_object_get(settings, "gtk-dnd-drag-threshold", &drag_min_distance, NULL); |
127 if (event->y - y_position_of_last_press_ < drag_min_distance) | 127 if (event->y - y_position_of_last_press_ < drag_min_distance) |
128 return FALSE; | 128 return FALSE; |
129 | 129 |
130 // We will show the menu now. Cancel the delayed event. | 130 // We will show the menu now. Cancel the delayed event. |
131 show_menu_factory_.RevokeAll(); | 131 show_menu_factory_.RevokeAll(); |
132 ShowBackForwardMenu(); | 132 ShowBackForwardMenu(); |
133 return FALSE; | 133 return FALSE; |
134 } | 134 } |
OLD | NEW |