| 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/gtk_dnd_util.h" | 9 #include "app/gtk_dnd_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 end_unselected_width_(0), | 123 end_unselected_width_(0), |
| 124 layout_on_completion_(false), | 124 layout_on_completion_(false), |
| 125 type_(type) { | 125 type_(type) { |
| 126 } | 126 } |
| 127 virtual ~TabAnimation() {} | 127 virtual ~TabAnimation() {} |
| 128 | 128 |
| 129 Type type() const { return type_; } | 129 Type type() const { return type_; } |
| 130 | 130 |
| 131 void Start() { | 131 void Start() { |
| 132 animation_.SetSlideDuration(GetDuration()); | 132 animation_.SetSlideDuration(GetDuration()); |
| 133 animation_.SetTweenType(SlideAnimation::EASE_OUT); | 133 animation_.SetTweenType(Tween::EASE_OUT); |
| 134 if (!animation_.IsShowing()) { | 134 if (!animation_.IsShowing()) { |
| 135 animation_.Reset(); | 135 animation_.Reset(); |
| 136 animation_.Show(); | 136 animation_.Show(); |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 | 139 |
| 140 void Stop() { | 140 void Stop() { |
| 141 animation_.Stop(); | 141 animation_.Stop(); |
| 142 } | 142 } |
| 143 | 143 |
| (...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2045 | 2045 |
| 2046 // Let the middle mouse button initiate clicks as well. | 2046 // Let the middle mouse button initiate clicks as well. |
| 2047 gtk_util::SetButtonTriggersNavigation(button->widget()); | 2047 gtk_util::SetButtonTriggersNavigation(button->widget()); |
| 2048 g_signal_connect(button->widget(), "clicked", | 2048 g_signal_connect(button->widget(), "clicked", |
| 2049 G_CALLBACK(OnNewTabClicked), this); | 2049 G_CALLBACK(OnNewTabClicked), this); |
| 2050 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); | 2050 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); |
| 2051 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); | 2051 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); |
| 2052 | 2052 |
| 2053 return button; | 2053 return button; |
| 2054 } | 2054 } |
| OLD | NEW |