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

Side by Side Diff: chrome/browser/gtk/bookmark_utils_gtk.cc

Issue 6134010: Revert 71167 - Remove wstring from gfx.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/bookmark_utils_gtk.h" 5 #include "chrome/browser/gtk/bookmark_utils_gtk.h"
6 6
7 #include "app/gtk_dnd_util.h" 7 #include "app/gtk_dnd_util.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 "base/pickle.h" 10 #include "base/pickle.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 gdk_cairo_set_source_pixbuf(cr, data->favicon, 0, 0); 132 gdk_cairo_set_source_pixbuf(cr, data->favicon, 0, 0);
133 cairo_paint(cr); 133 cairo_paint(cr);
134 cairo_destroy(cr); 134 cairo_destroy(cr);
135 135
136 // Paint the title text. 136 // Paint the title text.
137 gfx::CanvasSkiaPaint canvas(event, false); 137 gfx::CanvasSkiaPaint canvas(event, false);
138 int text_x = gdk_pixbuf_get_width(data->favicon) + kBarButtonPadding; 138 int text_x = gdk_pixbuf_get_width(data->favicon) + kBarButtonPadding;
139 int text_width = sender->allocation.width - text_x; 139 int text_width = sender->allocation.width - text_x;
140 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 140 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
141 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont); 141 const gfx::Font& base_font = rb.GetFont(ResourceBundle::BaseFont);
142 canvas.DrawStringInt(data->text, base_font, data->text_color, 142 canvas.DrawStringInt(UTF16ToWide(data->text),
143 base_font, data->text_color,
143 text_x, 0, text_width, sender->allocation.height); 144 text_x, 0, text_width, sender->allocation.height);
144 145
145 return TRUE; 146 return TRUE;
146 } 147 }
147 148
148 void OnDragIconDestroy(GtkWidget* drag_icon, 149 void OnDragIconDestroy(GtkWidget* drag_icon,
149 DragRepresentationData* data) { 150 DragRepresentationData* data) {
150 g_object_unref(drag_icon); 151 g_object_unref(drag_icon);
151 delete data; 152 delete data;
152 } 153 }
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 GURL url; 432 GURL url;
432 string16 title; 433 string16 title;
433 if (!gtk_dnd_util::ExtractNetscapeURL(selection_data, &url, &title)) 434 if (!gtk_dnd_util::ExtractNetscapeURL(selection_data, &url, &title))
434 return false; 435 return false;
435 436
436 model->AddURL(parent, idx, title, url); 437 model->AddURL(parent, idx, title, url);
437 return true; 438 return true;
438 } 439 }
439 440
440 } // namespace bookmark_utils 441 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/panels/panel_scroller_header.cc ('k') | chrome/browser/gtk/options/fonts_page_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698