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/tabs/tab_strip_gtk.h" | 5 #include "chrome/browser/gtk/tabs/tab_strip_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/gfx/canvas_paint.h" | |
10 #include "app/gtk_dnd_util.h" | 9 #include "app/gtk_dnd_util.h" |
11 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
12 #include "app/slide_animation.h" | 11 #include "app/slide_animation.h" |
13 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
14 #include "base/string_util.h" | 13 #include "base/string_util.h" |
15 #include "chrome/browser/autocomplete/autocomplete.h" | 14 #include "chrome/browser/autocomplete/autocomplete.h" |
16 #include "chrome/browser/browser_theme_provider.h" | 15 #include "chrome/browser/browser_theme_provider.h" |
17 #include "chrome/browser/gtk/browser_window_gtk.h" | 16 #include "chrome/browser/gtk/browser_window_gtk.h" |
18 #include "chrome/browser/gtk/custom_button.h" | 17 #include "chrome/browser/gtk/custom_button.h" |
19 #include "chrome/browser/gtk/gtk_theme_provider.h" | 18 #include "chrome/browser/gtk/gtk_theme_provider.h" |
20 #include "chrome/browser/gtk/gtk_util.h" | 19 #include "chrome/browser/gtk/gtk_util.h" |
21 #include "chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h" | 20 #include "chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h" |
22 #include "chrome/browser/profile.h" | 21 #include "chrome/browser/profile.h" |
23 #include "chrome/browser/tab_contents/tab_contents.h" | 22 #include "chrome/browser/tab_contents/tab_contents.h" |
24 #include "chrome/common/notification_service.h" | 23 #include "chrome/common/notification_service.h" |
25 #include "chrome/common/notification_type.h" | 24 #include "chrome/common/notification_type.h" |
| 25 #include "gfx/canvas_paint.h" |
26 #include "gfx/gtk_util.h" | 26 #include "gfx/gtk_util.h" |
27 #include "gfx/point.h" | 27 #include "gfx/point.h" |
28 #include "grit/app_resources.h" | 28 #include "grit/app_resources.h" |
29 #include "grit/theme_resources.h" | 29 #include "grit/theme_resources.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 const int kDefaultAnimationDurationMs = 100; | 33 const int kDefaultAnimationDurationMs = 100; |
34 const int kResizeLayoutAnimationDurationMs = 166; | 34 const int kResizeLayoutAnimationDurationMs = 166; |
35 const int kReorderAnimationDurationMs = 166; | 35 const int kReorderAnimationDurationMs = 166; |
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2070 | 2070 |
2071 // Let the middle mouse button initiate clicks as well. | 2071 // Let the middle mouse button initiate clicks as well. |
2072 gtk_util::SetButtonTriggersNavigation(button->widget()); | 2072 gtk_util::SetButtonTriggersNavigation(button->widget()); |
2073 g_signal_connect(button->widget(), "clicked", | 2073 g_signal_connect(button->widget(), "clicked", |
2074 G_CALLBACK(OnNewTabClicked), this); | 2074 G_CALLBACK(OnNewTabClicked), this); |
2075 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); | 2075 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); |
2076 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); | 2076 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); |
2077 | 2077 |
2078 return button; | 2078 return button; |
2079 } | 2079 } |
OLD | NEW |