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

Side by Side Diff: chrome/browser/gtk/location_bar_view_gtk.cc

Issue 306044: Refactor implementation of BrowserActions, and add support for (Closed)
Patch Set: Make it work on linux too Created 11 years, 2 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_toolbar_gtk.cc ('k') | chrome/browser/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698