summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/toolbar_view.cc
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 00:42:41 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-07 00:42:41 +0000
commit8edf3bb8a0b6b1d61b392dd7612558b9bafed02a (patch)
tree06b099df0696d9f9932158f62007fa0c1f79e102 /chrome/browser/ui/views/toolbar_view.cc
parenta6ec0897e904792a60a12a58b26dd2214dbcfa39 (diff)
downloadchromium_src-8edf3bb8a0b6b1d61b392dd7612558b9bafed02a.zip
chromium_src-8edf3bb8a0b6b1d61b392dd7612558b9bafed02a.tar.gz
chromium_src-8edf3bb8a0b6b1d61b392dd7612558b9bafed02a.tar.bz2
Display only static background page badges. New art coming in a separate CL.
BUG=64144 TEST=enable extension with background page, see badge Review URL: http://codereview.chromium.org/6057008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/toolbar_view.cc')
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc20
1 files changed, 1 insertions, 19 deletions
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 5b22d5c..bf221e2 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -22,7 +22,6 @@
#include "chrome/browser/ui/views/event_utils.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/upgrade_detector.h"
-#include "chrome/common/badge_util.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "gfx/canvas.h"
@@ -73,10 +72,6 @@ static const int kPopupTopSpacingNonGlass = 3;
static const int kPopupBottomSpacingNonGlass = 2;
static const int kPopupBottomSpacingGlass = 1;
-// The size of the font to use in the text overlay for the background page
-// badge.
-static const float kBadgeTextFontSize = 9.0;
-
// Top margin for the wrench menu badges (badge is placed in the upper right
// corner of the wrench menu).
static const int kBadgeTopMargin = 2;
@@ -755,7 +750,7 @@ SkBitmap ToolbarView::GetAppMenuIcon(views::CustomButton::ButtonState state) {
if (IsUpgradeRecommended()) {
badge = *tp->GetBitmapNamed(IDR_UPDATE_BADGE);
} else if (ShouldShowBackgroundPageBadge()) {
- badge = GetBackgroundPageBadge();
+ badge = *tp->GetBitmapNamed(IDR_BACKGROUND_BADGE);
} else if (ShouldShowIncompatibilityWarning()) {
#if defined(OS_WIN)
badge = *tp->GetBitmapNamed(IDR_CONFLICT_BADGE);
@@ -770,16 +765,3 @@ SkBitmap ToolbarView::GetAppMenuIcon(views::CustomButton::ButtonState state) {
return canvas->ExtractBitmap();
}
-
-SkBitmap ToolbarView::GetBackgroundPageBadge() {
- ThemeProvider* tp = GetThemeProvider();
- SkBitmap* badge = tp->GetBitmapNamed(IDR_BACKGROUND_BADGE);
- string16 badge_text = base::FormatNumber(
- BackgroundPageTracker::GetInstance()->GetBackgroundPageCount());
- return badge_util::DrawBadgeIconOverlay(
- *badge,
- kBadgeTextFontSize,
- badge_text,
- l10n_util::GetStringUTF16(IDS_BACKGROUND_PAGE_BADGE_OVERFLOW));
-}
-