| 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/location_bar_view_gtk.h" | 5 #include "chrome/browser/ui/gtk/location_bar_view_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1648 | 1648 |
| 1649 int tab_id = ExtensionTabUtil::GetTabId(contents); | 1649 int tab_id = ExtensionTabUtil::GetTabId(contents); |
| 1650 if (tab_id < 0) | 1650 if (tab_id < 0) |
| 1651 return FALSE; | 1651 return FALSE; |
| 1652 | 1652 |
| 1653 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1653 std::string badge_text = page_action_->GetBadgeText(tab_id); |
| 1654 if (badge_text.empty()) | 1654 if (badge_text.empty()) |
| 1655 return FALSE; | 1655 return FALSE; |
| 1656 | 1656 |
| 1657 gfx::CanvasSkiaPaint canvas(event, false); | 1657 gfx::CanvasSkiaPaint canvas(event, false); |
| 1658 gfx::Rect bounding_rect(widget->allocation); | 1658 GtkAllocation allocation; |
| 1659 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1659 gtk_widget_get_allocation(widget, &allocation); |
| 1660 page_action_->PaintBadge(&canvas, gfx::Rect(allocation), tab_id); |
| 1660 return FALSE; | 1661 return FALSE; |
| 1661 } | 1662 } |
| OLD | NEW |