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

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, 4 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/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bc5a5399a79027686c22782ffe30885ec3f4a7fb..cf73c13f1d35de92b7aa82b408f9d4179b5f62d3 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -163,13 +163,15 @@ void LocationBarView::FadeAnimationObserver::OnImplicitAnimationsCompleted() {
// LocationBarView -----------------------------------------------------------
-LocationBarView::LocationBarView(Profile* profile,
+LocationBarView::LocationBarView(Browser* browser,
+ Profile* profile,
CommandUpdater* command_updater,
ToolbarModel* model,
Delegate* delegate,
chrome::search::SearchModel* search_model,
Mode mode)
- : profile_(profile),
+ : browser_(browser),
+ profile_(profile),
command_updater_(command_updater),
model_(model),
delegate_(delegate),
@@ -278,9 +280,8 @@ void LocationBarView::Init(views::View* popup_parent_view) {
zoom_view_ = new ZoomView(model_);
AddChildView(zoom_view_);
- if (extensions::switch_utils::IsActionBoxEnabled()) {
- action_box_button_view_ = new ActionBoxButtonView(
- extensions::ExtensionSystem::Get(profile_)->extension_service());
+ if (extensions::switch_utils::IsActionBoxEnabled() && browser_) {
+ action_box_button_view_ = new ActionBoxButtonView(browser_, profile_);
AddChildView(action_box_button_view_);
} else if (browser_defaults::bookmarks_enabled && (mode_ == NORMAL)) {
// Note: condition above means that the star and ChromeToMobile icons are
@@ -509,6 +510,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_starred(on);
}
void LocationBarView::ShowStarBubble(const GURL& url, bool newly_bookmarked) {
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698