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

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

Issue 113443: ChromeCanvas->gfx::Canvas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
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 "app/gfx/chrome_canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "app/slide_animation.h" 10 #include "app/slide_animation.h"
11 #include "base/gfx/gtk_util.h" 11 #include "base/gfx/gtk_util.h"
12 #include "base/gfx/point.h" 12 #include "base/gfx/point.h"
13 #include "chrome/browser/browser.h" 13 #include "chrome/browser/browser.h"
14 #include "chrome/browser/browser_theme_provider.h" 14 #include "chrome/browser/browser_theme_provider.h"
15 #include "chrome/browser/gtk/custom_button.h" 15 #include "chrome/browser/gtk/custom_button.h"
16 #include "chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h" 16 #include "chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h"
17 #include "chrome/browser/tab_contents/tab_contents.h" 17 #include "chrome/browser/tab_contents/tab_contents.h"
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 else 1053 else
1054 tabstrip->ResizeLayoutTabs(); 1054 tabstrip->ResizeLayoutTabs();
1055 } 1055 }
1056 1056
1057 // static 1057 // static
1058 void TabStripGtk::OnNewTabClicked(GtkWidget* widget, TabStripGtk* tabstrip) { 1058 void TabStripGtk::OnNewTabClicked(GtkWidget* widget, TabStripGtk* tabstrip) {
1059 tabstrip->model_->delegate()->AddBlankTab(true); 1059 tabstrip->model_->delegate()->AddBlankTab(true);
1060 } 1060 }
1061 1061
1062 void TabStripGtk::PaintBackground(GdkEventExpose* event) { 1062 void TabStripGtk::PaintBackground(GdkEventExpose* event) {
1063 ChromeCanvasPaint canvas(event); 1063 gfx::CanvasPaint canvas(event);
1064 canvas.TileImageInt(*background, 0, 0, bounds_.width(), bounds_.height()); 1064 canvas.TileImageInt(*background, 0, 0, bounds_.width(), bounds_.height());
1065 } 1065 }
1066 1066
1067 void TabStripGtk::SetTabBounds(TabGtk* tab, const gfx::Rect& bounds) { 1067 void TabStripGtk::SetTabBounds(TabGtk* tab, const gfx::Rect& bounds) {
1068 tab->SetBounds(bounds); 1068 tab->SetBounds(bounds);
1069 gtk_fixed_move(GTK_FIXED(tabstrip_.get()), tab->widget(), 1069 gtk_fixed_move(GTK_FIXED(tabstrip_.get()), tab->widget(),
1070 bounds.x(), bounds.y()); 1070 bounds.x(), bounds.y());
1071 } 1071 }
1072 1072
1073 CustomDrawButton* TabStripGtk::MakeNewTabButton() { 1073 CustomDrawButton* TabStripGtk::MakeNewTabButton() {
1074 CustomDrawButton* button = new CustomDrawButton(IDR_NEWTAB_BUTTON, 1074 CustomDrawButton* button = new CustomDrawButton(IDR_NEWTAB_BUTTON,
1075 IDR_NEWTAB_BUTTON_P, IDR_NEWTAB_BUTTON_H, 0); 1075 IDR_NEWTAB_BUTTON_P, IDR_NEWTAB_BUTTON_H, 0);
1076 1076
1077 g_signal_connect(G_OBJECT(button->widget()), "clicked", 1077 g_signal_connect(G_OBJECT(button->widget()), "clicked",
1078 G_CALLBACK(OnNewTabClicked), this); 1078 G_CALLBACK(OnNewTabClicked), this);
1079 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS); 1079 GTK_WIDGET_UNSET_FLAGS(button->widget(), GTK_CAN_FOCUS);
1080 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0); 1080 gtk_fixed_put(GTK_FIXED(tabstrip_.get()), button->widget(), 0, 0);
1081 1081
1082 return button; 1082 return button;
1083 } 1083 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_renderer_gtk.cc ('k') | chrome/browser/printing/printed_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698