| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/gtk/location_bar_view_gtk.h" | 5 #include "chrome/browser/gtk/location_bar_view_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/gfx/canvas_paint.h" | 9 #include "app/gfx/canvas_paint.h" |
| 10 #include "app/gfx/gtk_util.h" | 10 #include "app/gfx/gtk_util.h" |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 TabContents* contents = view->owner_->browser_->GetSelectedTabContents(); | 808 TabContents* contents = view->owner_->browser_->GetSelectedTabContents(); |
| 809 if (!contents) | 809 if (!contents) |
| 810 return FALSE; | 810 return FALSE; |
| 811 const ExtensionActionState* state = | 811 const ExtensionActionState* state = |
| 812 contents->GetPageActionState(view->page_action_); | 812 contents->GetPageActionState(view->page_action_); |
| 813 if (!state || state->badge_text().empty()) | 813 if (!state || state->badge_text().empty()) |
| 814 return FALSE; | 814 return FALSE; |
| 815 | 815 |
| 816 gfx::CanvasPaint canvas(event, false); | 816 gfx::CanvasPaint canvas(event, false); |
| 817 gfx::Rect bounding_rect(widget->allocation); | 817 gfx::Rect bounding_rect(widget->allocation); |
| 818 state->PaintBadge(&canvas, bounding_rect); | 818 ExtensionActionState::PaintBadge(&canvas, bounding_rect, |
| 819 state->badge_text(), |
| 820 state->badge_text_color(), |
| 821 state->badge_background_color()); |
| 819 return FALSE; | 822 return FALSE; |
| 820 } | 823 } |
| OLD | NEW |