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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 10533086: Action box menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Action box menu Created 8 years, 5 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
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..d9e518eca8020dbd95cc59eaf1503fabc26d1d02 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_->SetBookmarkState(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();
}

Powered by Google App Engine
This is Rietveld 408576698