From 087e187238bafb30e6d28e2175e11fd56054e6d7 Mon Sep 17 00:00:00 2001 From: "avayvod@chromium.org" Date: Fri, 5 Feb 2010 02:09:52 +0000 Subject: Added Star button to compact navigation mode. BUG=32326 TEST=Switch Chrome to compact mode by pressing Ctrl-Shift-C. Test that Star icon works. Review URL: http://codereview.chromium.org/543215 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38166 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/views/toolbar_view.cc | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'chrome/browser/views/toolbar_view.cc') diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc index d3f76aba..0762ce2 100644 --- a/chrome/browser/views/toolbar_view.cc +++ b/chrome/browser/views/toolbar_view.cc @@ -4,6 +4,7 @@ #include "chrome/browser/views/toolbar_view.h" +#include #include #include "app/drag_drop_types.h" @@ -565,13 +566,12 @@ void ToolbarView::CreateLeftSideControls() { } void ToolbarView::CreateCenterStack(Profile *profile) { - star_ = new ToolbarStarToggle(this, this); - star_->set_tag(IDC_BOOKMARK_PAGE); + star_ = new ToolbarStarToggle(this); star_->SetDragController(this); - star_->SetTooltipText(l10n_util::GetString(IDS_TOOLTIP_STAR)); - star_->SetToggledTooltipText(l10n_util::GetString(IDS_TOOLTIP_STARRED)); - star_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_STAR)); - star_->SetID(VIEW_ID_STAR_BUTTON); + star_->set_profile(profile); + star_->set_host_view(this); + star_->set_bubble_positioner(this); + star_->Init(); AddChildView(star_); location_bar_ = new LocationBarView(profile, browser_->command_updater(), @@ -669,21 +669,6 @@ void ToolbarView::LoadCenterStackImages() { SkColor color = tp->GetColor(BrowserThemeProvider::COLOR_BUTTON_BACKGROUND); SkBitmap* background = tp->GetBitmapNamed(IDR_THEME_BUTTON_BACKGROUND); - star_->SetImage(views::CustomButton::BS_NORMAL, tp->GetBitmapNamed(IDR_STAR)); - star_->SetImage(views::CustomButton::BS_HOT, tp->GetBitmapNamed(IDR_STAR_H)); - star_->SetImage(views::CustomButton::BS_PUSHED, - tp->GetBitmapNamed(IDR_STAR_P)); - star_->SetImage(views::CustomButton::BS_DISABLED, - tp->GetBitmapNamed(IDR_STAR_D)); - star_->SetToggledImage(views::CustomButton::BS_NORMAL, - tp->GetBitmapNamed(IDR_STARRED)); - star_->SetToggledImage(views::CustomButton::BS_HOT, - tp->GetBitmapNamed(IDR_STARRED_H)); - star_->SetToggledImage(views::CustomButton::BS_PUSHED, - tp->GetBitmapNamed(IDR_STARRED_P)); - star_->SetBackground(color, background, - tp->GetBitmapNamed(IDR_STAR_MASK)); - go_->SetImage(views::CustomButton::BS_NORMAL, tp->GetBitmapNamed(IDR_GO)); go_->SetImage(views::CustomButton::BS_HOT, tp->GetBitmapNamed(IDR_GO_H)); go_->SetImage(views::CustomButton::BS_PUSHED, tp->GetBitmapNamed(IDR_GO_P)); -- cgit v1.1