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 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1629 return FALSE; | 1629 return FALSE; |
1630 | 1630 |
1631 int tab_id = ExtensionTabUtil::GetTabId(contents); | 1631 int tab_id = ExtensionTabUtil::GetTabId(contents); |
1632 if (tab_id < 0) | 1632 if (tab_id < 0) |
1633 return FALSE; | 1633 return FALSE; |
1634 | 1634 |
1635 std::string badge_text = page_action_->GetBadgeText(tab_id); | 1635 std::string badge_text = page_action_->GetBadgeText(tab_id); |
1636 if (badge_text.empty()) | 1636 if (badge_text.empty()) |
1637 return FALSE; | 1637 return FALSE; |
1638 | 1638 |
1639 gfx::CanvasSkiaPaint canvas(event, false); | 1639 gfx::CanvasSkiaPaint canvas_paint(event, false); |
1640 gfx::Rect bounding_rect(widget->allocation); | 1640 gfx::Rect bounding_rect(widget->allocation); |
1641 page_action_->PaintBadge(&canvas, bounding_rect, tab_id); | 1641 page_action_->PaintBadge(canvas_paint.AsCanvas(), bounding_rect, tab_id); |
1642 return FALSE; | 1642 return FALSE; |
1643 } | 1643 } |
OLD | NEW |