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

Unified Diff: chrome/browser/views/location_bar_view.cc

Issue 551105: Fix browser crash in extensions due to painting badges on PageActions.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/location_bar_view.cc
===================================================================
--- chrome/browser/views/location_bar_view.cc (revision 36660)
+++ chrome/browser/views/location_bar_view.cc (working copy)
@@ -75,6 +75,7 @@
class LocationBarView::PageActionWithBadgeView : public views::View {
public:
explicit PageActionWithBadgeView(PageActionImageView* image_view);
+ virtual ~PageActionWithBadgeView() {}
Aaron Boodman 2010/01/21 23:10:58 ~View is virtual so I don't think this is necessar
PageActionImageView* image_view() { return image_view_; }
@@ -88,11 +89,10 @@
private:
virtual void Layout();
- // Override PaintChildren so that we can paint the badge on top of children.
- virtual void PaintChildren(gfx::Canvas* canvas);
-
// The button this view contains.
PageActionImageView* image_view_;
+
+ DISALLOW_COPY_AND_ASSIGN(PageActionWithBadgeView);
};
LocationBarView::PageActionWithBadgeView::PageActionWithBadgeView(
@@ -111,18 +111,6 @@
image_view_->SetBounds(0, y, width(), height());
}
-void LocationBarView::PageActionWithBadgeView::PaintChildren(
- gfx::Canvas* canvas) {
- View::PaintChildren(canvas);
-
- ExtensionAction* action = image_view_->page_action();
- int tab_id = image_view_->current_tab_id();
- if (tab_id < 0)
- return;
-
- action->PaintBadge(canvas, gfx::Rect(width(), height()), tab_id);
-}
-
void LocationBarView::PageActionWithBadgeView::UpdateVisibility(
TabContents* contents, const GURL& url) {
image_view_->UpdateVisibility(contents, url);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698