Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
index 4894ff6963de12d1432fc1bb02366a9ee34dc830..5eaf87be549093fbbedb515c4f1902710b49ac7a 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -274,8 +274,7 @@ void LocationBarView::Init(views::View* popup_parent_view) { |
AddChildView(zoom_view_); |
if (extensions::switch_utils::IsActionBoxEnabled()) { |
- action_box_button_view_ = new ActionBoxButtonView( |
- extensions::ExtensionSystem::Get(profile_)->extension_service()); |
+ action_box_button_view_ = new ActionBoxButtonView(profile_, this); |
AddChildView(action_box_button_view_); |
} else if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) { |
// Note: condition above means that the star and ChromeToMobile icons are |
@@ -496,6 +495,8 @@ views::View* LocationBarView::GetPageActionView(ExtensionAction *page_action) { |
void LocationBarView::SetStarToggled(bool on) { |
if (star_view_) |
star_view_->SetToggled(on); |
+ if (action_box_button_view_) |
+ action_box_button_view_->set_bookmark_state(on); |
} |
void LocationBarView::ShowStarBubble(const GURL& url, bool newly_bookmarked) { |
@@ -1060,6 +1061,10 @@ TabContents* LocationBarView::GetTabContents() const { |
return delegate_->GetTabContents(); |
} |
+Browser* LocationBarView::GetBrowser() const { |
+ return GetBrowserFromDelegate(delegate_); |
+} |
+ |
int LocationBarView::AvailableWidth(int location_bar_width) { |
return location_bar_width - location_entry_->TextWidth(); |
} |