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 "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" | 5 #include "chrome/browser/ui/gtk/tabs/tab_strip_gtk.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1221 switch (event->type) { | 1221 switch (event->type) { |
1222 case GDK_MOTION_NOTIFY: | 1222 case GDK_MOTION_NOTIFY: |
1223 case GDK_LEAVE_NOTIFY: | 1223 case GDK_LEAVE_NOTIFY: |
1224 HandleGlobalMouseMoveEvent(); | 1224 HandleGlobalMouseMoveEvent(); |
1225 break; | 1225 break; |
1226 default: | 1226 default: |
1227 break; | 1227 break; |
1228 } | 1228 } |
1229 } | 1229 } |
1230 | 1230 |
| 1231 /////////////////////////////////////////////////////////////////////////////// |
| 1232 // TabStripGtk, NotificationObserver implementation: |
| 1233 |
1231 void TabStripGtk::Observe(NotificationType type, | 1234 void TabStripGtk::Observe(NotificationType type, |
1232 const NotificationSource& source, | 1235 const NotificationSource& source, |
1233 const NotificationDetails& details) { | 1236 const NotificationDetails& details) { |
1234 if (type == NotificationType::BROWSER_THEME_CHANGED) { | 1237 if (type == NotificationType::BROWSER_THEME_CHANGED) { |
1235 TabRendererGtk::SetSelectedTitleColor(theme_provider_->GetColor( | 1238 TabRendererGtk::SetSelectedTitleColor(theme_provider_->GetColor( |
1236 BrowserThemeProvider::COLOR_TAB_TEXT)); | 1239 BrowserThemeProvider::COLOR_TAB_TEXT)); |
1237 TabRendererGtk::SetUnselectedTitleColor(theme_provider_->GetColor( | 1240 TabRendererGtk::SetUnselectedTitleColor(theme_provider_->GetColor( |
1238 BrowserThemeProvider::COLOR_BACKGROUND_TAB_TEXT)); | 1241 BrowserThemeProvider::COLOR_BACKGROUND_TAB_TEXT)); |
1239 } | 1242 } |
1240 } | 1243 } |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2054 | 2057 |
2055 // Let the middle mouse button initiate clicks as well. | 2058 // Let the middle mouse button initiate clicks as well. |
2056 gtk_util::SetButtonTriggersNavigation(button->widget()); | 2059 gtk_util::SetButtonTriggersNavigation(button->widget()); |
2057 g_signal_connect(button->widget(), "clicked", | 2060 g_signal_connect(button->widget(), "clicked", |
2058 G_CALLBACK(OnNewTabClickedThunk), this); | 2061 G_CALLBACK(OnNewTabClickedThunk), this); |
2059 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); | 2062 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); |
2060 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); | 2063 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); |
2061 | 2064 |
2062 return button; | 2065 return button; |
2063 } | 2066 } |
OLD | NEW |