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

Unified Diff: chrome/browser/views/toolbar_view.cc

Issue 543215: Added Star button to compact navigation mode.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/toolbar_star_toggle.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/toolbar_view.cc
===================================================================
--- chrome/browser/views/toolbar_view.cc (revision 38044)
+++ chrome/browser/views/toolbar_view.cc (working copy)
@@ -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::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 @@
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));
« no previous file with comments | « chrome/browser/views/toolbar_star_toggle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698