diff options
author | avayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 02:09:52 +0000 |
---|---|---|
committer | avayvod@chromium.org <avayvod@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 02:09:52 +0000 |
commit | 087e187238bafb30e6d28e2175e11fd56054e6d7 (patch) | |
tree | d90dcd0e4a6c875ace2ae93368f3a30dbc0a76e6 /chrome/browser/views/toolbar_view.cc | |
parent | 520b068ec2458f3441c84b6be13397d7a8daad4d (diff) | |
download | chromium_src-087e187238bafb30e6d28e2175e11fd56054e6d7.zip chromium_src-087e187238bafb30e6d28e2175e11fd56054e6d7.tar.gz chromium_src-087e187238bafb30e6d28e2175e11fd56054e6d7.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/views/toolbar_view.cc')
-rw-r--r-- | chrome/browser/views/toolbar_view.cc | 27 |
1 files changed, 6 insertions, 21 deletions
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 <algorithm> #include <string> #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)); |