| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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" | 9 #include "app/gfx/canvas_paint.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 } | 1081 } |
| 1082 | 1082 |
| 1083 bool TabStripGtk::EndDrag(bool canceled) { | 1083 bool TabStripGtk::EndDrag(bool canceled) { |
| 1084 return drag_controller_.get() ? drag_controller_->EndDrag(canceled) : false; | 1084 return drag_controller_.get() ? drag_controller_->EndDrag(canceled) : false; |
| 1085 } | 1085 } |
| 1086 | 1086 |
| 1087 bool TabStripGtk::HasAvailableDragActions() const { | 1087 bool TabStripGtk::HasAvailableDragActions() const { |
| 1088 return model_->delegate()->GetDragActions() != 0; | 1088 return model_->delegate()->GetDragActions() != 0; |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 ThemeProvider* TabStripGtk::GetThemeProvider() { |
| 1092 return theme_provider_; |
| 1093 } |
| 1094 |
| 1091 /////////////////////////////////////////////////////////////////////////////// | 1095 /////////////////////////////////////////////////////////////////////////////// |
| 1092 // TabStripGtk, MessageLoop::Observer implementation: | 1096 // TabStripGtk, MessageLoop::Observer implementation: |
| 1093 | 1097 |
| 1094 void TabStripGtk::WillProcessEvent(GdkEvent* event) { | 1098 void TabStripGtk::WillProcessEvent(GdkEvent* event) { |
| 1095 // Nothing to do. | 1099 // Nothing to do. |
| 1096 } | 1100 } |
| 1097 | 1101 |
| 1098 void TabStripGtk::DidProcessEvent(GdkEvent* event) { | 1102 void TabStripGtk::DidProcessEvent(GdkEvent* event) { |
| 1099 switch (event->type) { | 1103 switch (event->type) { |
| 1100 case GDK_MOTION_NOTIFY: | 1104 case GDK_MOTION_NOTIFY: |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1908 message.set_type(TabOverviewTypes::Message::WM_SWITCH_TO_OVERVIEW_MODE); | 1912 message.set_type(TabOverviewTypes::Message::WM_SWITCH_TO_OVERVIEW_MODE); |
| 1909 GtkWidget* browser_widget = GTK_WIDGET( | 1913 GtkWidget* browser_widget = GTK_WIDGET( |
| 1910 static_cast<BrowserWindowGtk*>(browser->window())->GetNativeHandle()); | 1914 static_cast<BrowserWindowGtk*>(browser->window())->GetNativeHandle()); |
| 1911 message.set_param(0, x11_util::GetX11WindowFromGtkWidget(browser_widget)); | 1915 message.set_param(0, x11_util::GetX11WindowFromGtkWidget(browser_widget)); |
| 1912 TabOverviewTypes::instance()->SendMessage(message); | 1916 TabOverviewTypes::instance()->SendMessage(message); |
| 1913 | 1917 |
| 1914 UserMetrics::RecordAction(L"TabOverview_PressedTabOverviewButton", | 1918 UserMetrics::RecordAction(L"TabOverview_PressedTabOverviewButton", |
| 1915 tabstrip->model_->profile()); | 1919 tabstrip->model_->profile()); |
| 1916 } | 1920 } |
| 1917 #endif | 1921 #endif |
| OLD | NEW |