| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |