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

Side by Side Diff: chrome/browser/ui/gtk/browser_toolbar_gtk.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/gtk/browser_toolbar_gtk.h" 5 #include "chrome/browser/ui/gtk/browser_toolbar_gtk.h"
6 6
7 #include <X11/XF86keysym.h> 7 #include <X11/XF86keysym.h>
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 gboolean BrowserToolbarGtk::OnWrenchMenuButtonExpose(GtkWidget* sender, 628 gboolean BrowserToolbarGtk::OnWrenchMenuButtonExpose(GtkWidget* sender,
629 GdkEventExpose* expose) { 629 GdkEventExpose* expose) {
630 const SkBitmap* badge = NULL; 630 const SkBitmap* badge = NULL;
631 if (UpgradeDetector::GetInstance()->notify_upgrade()) { 631 if (UpgradeDetector::GetInstance()->notify_upgrade()) {
632 badge = theme_service_->GetBitmapNamed(IDR_UPDATE_BADGE); 632 badge = theme_service_->GetBitmapNamed(IDR_UPDATE_BADGE);
633 } else { 633 } else {
634 return FALSE; 634 return FALSE;
635 } 635 }
636 636
637 // Draw the chrome app menu icon onto the canvas. 637 // Draw the chrome app menu icon onto the canvas.
638 gfx::CanvasSkiaPaint canvas(expose, false); 638 gfx::CanvasSkiaPaint canvas_paint(expose, false);
639 gfx::Canvas* canvas = canvas_paint.AsCanvas();
639 int x_offset = base::i18n::IsRTL() ? 0 : 640 int x_offset = base::i18n::IsRTL() ? 0 :
640 sender->allocation.width - badge->width(); 641 sender->allocation.width - badge->width();
641 int y_offset = 0; 642 int y_offset = 0;
642 canvas.DrawBitmapInt( 643 canvas->DrawBitmapInt(
643 *badge, 644 *badge,
644 sender->allocation.x + x_offset, 645 sender->allocation.x + x_offset,
645 sender->allocation.y + y_offset); 646 sender->allocation.y + y_offset);
646 647
647 return FALSE; 648 return FALSE;
648 } 649 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc ('k') | chrome/browser/ui/gtk/download/download_item_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698