Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Side by Side Diff: chrome/browser/gtk/tabs/tab_strip_gtk.cc

Issue 155075: Popup changes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/views/panel_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 G_CALLBACK(OnNewTabClicked), this); 1577 G_CALLBACK(OnNewTabClicked), this);
1578 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); 1578 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS);
1579 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); 1579 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0);
1580 1580
1581 return button; 1581 return button;
1582 } 1582 }
1583 1583
1584 #if defined(LINUX2) 1584 #if defined(LINUX2)
1585 CustomDrawButton* TabStripGtk::MakeTabOverviewButton() { 1585 CustomDrawButton* TabStripGtk::MakeTabOverviewButton() {
1586 CustomDrawButton* button = 1586 CustomDrawButton* button =
1587 new CustomDrawButton(IDR_TAB_OVERVIEW_BUTTON_ICON, 0, 0, 0); 1587 new CustomDrawButton(IDR_TAB_OVERVIEW_BUTTON_ICON, 0, 0, 0, NULL);
1588 1588
1589 g_signal_connect(G_OBJECT(button->widget()), "clicked", 1589 g_signal_connect(G_OBJECT(button->widget()), "clicked",
1590 G_CALLBACK(OnTabOverviewButtonClicked), this); 1590 G_CALLBACK(OnTabOverviewButtonClicked), this);
1591 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); 1591 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS);
1592 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); 1592 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0);
1593 1593
1594 return button; 1594 return button;
1595 } 1595 }
1596 1596
1597 // static 1597 // static
1598 void TabStripGtk::OnTabOverviewButtonClicked(GtkWidget* widget, 1598 void TabStripGtk::OnTabOverviewButtonClicked(GtkWidget* widget,
1599 TabStripGtk* tabstrip) { 1599 TabStripGtk* tabstrip) {
1600 Browser* browser = BrowserList::GetLastActive(); 1600 Browser* browser = BrowserList::GetLastActive();
1601 DCHECK(browser); // In order for the user to click on the tab there should 1601 DCHECK(browser); // In order for the user to click on the tab there should
1602 // be an active browser. 1602 // be an active browser.
1603 TabOverviewTypes::Message message; 1603 TabOverviewTypes::Message message;
1604 message.set_type(TabOverviewTypes::Message::WM_SWITCH_TO_OVERVIEW_MODE); 1604 message.set_type(TabOverviewTypes::Message::WM_SWITCH_TO_OVERVIEW_MODE);
1605 GtkWidget* browser_widget = GTK_WIDGET( 1605 GtkWidget* browser_widget = GTK_WIDGET(
1606 static_cast<BrowserWindowGtk*>(browser->window())->GetNativeHandle()); 1606 static_cast<BrowserWindowGtk*>(browser->window())->GetNativeHandle());
1607 message.set_param(0, x11_util::GetX11WindowFromGtkWidget(browser_widget)); 1607 message.set_param(0, x11_util::GetX11WindowFromGtkWidget(browser_widget));
1608 TabOverviewTypes::instance()->SendMessage(message); 1608 TabOverviewTypes::instance()->SendMessage(message);
1609 1609
1610 UserMetrics::RecordAction(L"TabOverview_PressedTabOverviewButton", 1610 UserMetrics::RecordAction(L"TabOverview_PressedTabOverviewButton",
1611 tabstrip->model_->profile()); 1611 tabstrip->model_->profile());
1612 } 1612 }
1613 #endif 1613 #endif
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/views/panel_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698