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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 6879013: skia::PlatformCanvas is being deprecated. Going forward we will use gfx::Canvas wherever we need ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 1083
1084 void BookmarkBarView::WriteDragDataForView(View* sender, 1084 void BookmarkBarView::WriteDragDataForView(View* sender,
1085 const gfx::Point& press_pt, 1085 const gfx::Point& press_pt,
1086 ui::OSExchangeData* data) { 1086 ui::OSExchangeData* data) {
1087 UserMetrics::RecordAction(UserMetricsAction("BookmarkBar_DragButton"), 1087 UserMetrics::RecordAction(UserMetricsAction("BookmarkBar_DragButton"),
1088 profile_); 1088 profile_);
1089 1089
1090 for (int i = 0; i < GetBookmarkButtonCount(); ++i) { 1090 for (int i = 0; i < GetBookmarkButtonCount(); ++i) {
1091 if (sender == GetBookmarkButton(i)) { 1091 if (sender == GetBookmarkButton(i)) {
1092 views::TextButton* button = GetBookmarkButton(i); 1092 views::TextButton* button = GetBookmarkButton(i);
1093 gfx::CanvasSkia canvas(button->width(), button->height(), false); 1093 gfx::CanvasSkia canvas;
1094 canvas.Init(button->width(), button->height(), false);
1094 button->PaintButton(&canvas, views::TextButton::PB_FOR_DRAG); 1095 button->PaintButton(&canvas, views::TextButton::PB_FOR_DRAG);
1095 drag_utils::SetDragImageOnDataObject(canvas, button->size(), press_pt, 1096 drag_utils::SetDragImageOnDataObject(canvas, button->size(), press_pt,
1096 data); 1097 data);
1097 WriteBookmarkDragData(model_->GetBookmarkBarNode()->GetChild(i), data); 1098 WriteBookmarkDragData(model_->GetBookmarkBarNode()->GetChild(i), data);
1098 return; 1099 return;
1099 } 1100 }
1100 } 1101 }
1101 NOTREACHED(); 1102 NOTREACHED();
1102 } 1103 }
1103 1104
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 // The tooltip is the only way we have to display text explaining the error 1784 // The tooltip is the only way we have to display text explaining the error
1784 // to the user. 1785 // to the user.
1785 sync_error_button->SetTooltipText( 1786 sync_error_button->SetTooltipText(
1786 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC))); 1787 UTF16ToWide(l10n_util::GetStringUTF16(IDS_SYNC_BOOKMARK_BAR_ERROR_DESC)));
1787 sync_error_button->SetAccessibleName( 1788 sync_error_button->SetAccessibleName(
1788 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON)); 1789 l10n_util::GetStringUTF16(IDS_ACCNAME_SYNC_ERROR_BUTTON));
1789 sync_error_button->SetIcon( 1790 sync_error_button->SetIcon(
1790 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING)); 1791 *ResourceBundle::GetSharedInstance().GetBitmapNamed(IDR_WARNING));
1791 return sync_error_button; 1792 return sync_error_button;
1792 } 1793 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc ('k') | chrome/browser/ui/views/browser_actions_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698