diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-24 04:35:08 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-24 04:35:08 +0000 |
commit | 92c6f9b9eac950c487f580709e3aab03843d15bc (patch) | |
tree | 4f25ceede36cf3655de577a48281910752f67262 /chrome/browser/views/location_bar_view.cc | |
parent | 20ee7a74a7587986ed5db9b13aac2a78a5f0bdfc (diff) | |
download | chromium_src-92c6f9b9eac950c487f580709e3aab03843d15bc.zip chromium_src-92c6f9b9eac950c487f580709e3aab03843d15bc.tar.gz chromium_src-92c6f9b9eac950c487f580709e3aab03843d15bc.tar.bz2 |
Refactor BrowserActions, and add support for
tab-specific state.
Future changelists will move Page Actions over to
ExtensionAction2, then replace ExtensionAction and
ExtensionActionState with ExtensionAction2.
Also, fix a bug in setIcon({path:...}) where it
would work only the first time.
BUG=24669,24472
Review URL: http://codereview.chromium.org/306044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29997 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/location_bar_view.cc')
-rw-r--r-- | chrome/browser/views/location_bar_view.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc index ff6034b..70ce478 100644 --- a/chrome/browser/views/location_bar_view.cc +++ b/chrome/browser/views/location_bar_view.cc @@ -109,8 +109,12 @@ void LocationBarView::PageActionWithBadgeView::PaintChildren( gfx::Canvas* canvas) { View::PaintChildren(canvas); const ExtensionActionState* state = image_view_->GetPageActionState(); - if (state) - state->PaintBadge(canvas, gfx::Rect(width(), height())); + if (state) { + ExtensionActionState::PaintBadge(canvas, gfx::Rect(width(), height()), + state->badge_text(), + state->badge_text_color(), + state->badge_background_color()); + } } void LocationBarView::PageActionWithBadgeView::UpdateVisibility( @@ -1230,8 +1234,12 @@ void LocationBarView::PageActionImageView::Paint(gfx::Canvas* canvas) { const ExtensionActionState* state = contents->GetPageActionState(page_action_); - if (state) - state->PaintBadge(canvas, gfx::Rect(width(), height())); + if (state) { + ExtensionActionState::PaintBadge(canvas, gfx::Rect(width(), height()), + state->badge_text(), + state->badge_text_color(), + state->badge_background_color()); + } } // PageActionImageView---------------------------------------------------------- |