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

Unified Diff: chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc

Issue 8392011: GTK: Step 1 of tab strip refresh. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to ToT again. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/tabs/dragged_view_gtk.h ('k') | chrome/browser/ui/gtk/tabs/tab_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc b/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc
index 682704e9493868670d81b33803e7d96f0f0caf57..a98ccb81b09ab2c7292e4684f31b3fd10b811b68 100644
--- a/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc
+++ b/chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
+#include "chrome/browser/ui/gtk/gtk_theme_service.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/browser/ui/gtk/tabs/drag_data.h"
#include "chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h"
@@ -63,7 +64,7 @@ DraggedViewGtk::DraggedViewGtk(DragData* drag_data,
close_animation_(this) {
std::vector<TabContents*> data_sources(drag_data_->GetDraggedTabsContents());
for (size_t i = 0; i < data_sources.size(); i++) {
- renderers_.push_back(new TabRendererGtk(ThemeServiceFactory::GetForProfile(
+ renderers_.push_back(new TabRendererGtk(GtkThemeService::GetFrom(
Profile::FromBrowserContext(data_sources[i]->browser_context()))));
}
@@ -342,7 +343,7 @@ void DraggedViewGtk::SetContainerShapeMask() {
cairo_set_operator(cairo_context, CAIRO_OPERATOR_SOURCE);
else
cairo_set_operator(cairo_context, CAIRO_OPERATOR_OVER);
- PaintTab(i, cairo_context, container_->allocation.width);
+ PaintTab(i, container_, cairo_context, container_->allocation.width);
}
if (!attached_) {
@@ -422,10 +423,11 @@ gboolean DraggedViewGtk::OnExpose(GtkWidget* widget, GdkEventExpose* event) {
for (int i = renderers_.size() - 1; i >= 0; i--) {
if (i == drag_data_->source_tab_index())
continue;
- PaintTab(i, cr, widget->allocation.width);
+ PaintTab(i, widget, cr, widget->allocation.width);
}
// Painting the active tab last, so that it appears on top.
- PaintTab(drag_data_->source_tab_index(), cr, widget->allocation.width);
+ PaintTab(drag_data_->source_tab_index(), widget, cr,
+ widget->allocation.width);
cairo_destroy(cr);
@@ -433,9 +435,10 @@ gboolean DraggedViewGtk::OnExpose(GtkWidget* widget, GdkEventExpose* event) {
return TRUE;
}
-void DraggedViewGtk::PaintTab(int index, cairo_t* cr, int widget_width) {
+void DraggedViewGtk::PaintTab(int index, GtkWidget* widget, cairo_t* cr,
+ int widget_width) {
dpapad 2011/10/28 16:56:52 Drive by comment. |widget_width| argument can now
renderers_[index]->set_mini(drag_data_->get(index)->mini_);
- cairo_surface_t* surface = renderers_[index]->PaintToSurface();
+ cairo_surface_t* surface = renderers_[index]->PaintToSurface(widget, cr);
int paint_at = 0;
if (!base::i18n::IsRTL()) {
« no previous file with comments | « chrome/browser/ui/gtk/tabs/dragged_view_gtk.h ('k') | chrome/browser/ui/gtk/tabs/tab_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698