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

Unified Diff: chrome/browser/views/bookmark_bar_view.cc

Issue 2862025: Canvas refactoring part 2.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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
Index: chrome/browser/views/bookmark_bar_view.cc
===================================================================
--- chrome/browser/views/bookmark_bar_view.cc (revision 50452)
+++ chrome/browser/views/bookmark_bar_view.cc (working copy)
@@ -38,6 +38,7 @@
#include "chrome/common/page_transition_types.h"
#include "chrome/common/pref_names.h"
#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -1110,10 +1111,10 @@
for (int i = 0; i < GetBookmarkButtonCount(); ++i) {
if (sender == GetBookmarkButton(i)) {
views::TextButton* button = GetBookmarkButton(i);
- gfx::Canvas canvas(button->width(), button->height(), false);
- button->Paint(&canvas, true);
- drag_utils::SetDragImageOnDataObject(canvas, button->size(), press_pt,
- data);
+ gfx::CanvasSkia canvas(button->width(), button->height(), false);
+ button->Paint(canvas.AsCanvas(), true);
+ drag_utils::SetDragImageOnDataObject(*canvas.AsCanvas(), button->size(),
+ press_pt, data);
WriteDragData(model_->GetBookmarkBarNode()->GetChild(i), data);
return;
}

Powered by Google App Engine
This is Rietveld 408576698