Index: chrome/browser/ui/views/toolbar/browser_actions_container.cc |
diff --git a/chrome/browser/ui/views/toolbar/browser_actions_container.cc b/chrome/browser/ui/views/toolbar/browser_actions_container.cc |
index f60019582a6e6cc9f2f15e6dbf4e9c491df87c06..877dec7aa3cfbfaa4621ef98d5f4abb5ea10f9ad 100644 |
--- a/chrome/browser/ui/views/toolbar/browser_actions_container.cc |
+++ b/chrome/browser/ui/views/toolbar/browser_actions_container.cc |
@@ -213,7 +213,7 @@ BrowserActionView* BrowserActionsContainer::GetBrowserActionView( |
ExtensionAction* action) { |
for (BrowserActionViews::iterator i(browser_action_views_.begin()); |
i != browser_action_views_.end(); ++i) { |
- if ((*i)->button()->extension_action() == action) |
+ if ((*i)->extension_action() == action) |
return *i; |
} |
return NULL; |
@@ -221,7 +221,7 @@ BrowserActionView* BrowserActionsContainer::GetBrowserActionView( |
void BrowserActionsContainer::RefreshBrowserActionViews() { |
for (size_t i = 0; i < browser_action_views_.size(); ++i) |
- browser_action_views_[i]->button()->UpdateState(); |
+ browser_action_views_[i]->UpdateState(); |
} |
void BrowserActionsContainer::CreateBrowserActionViews() { |
@@ -294,7 +294,7 @@ views::View* BrowserActionsContainer::GetOverflowReferenceView() { |
return chevron_; |
} |
-void BrowserActionsContainer::SetPopupOwner(BrowserActionButton* popup_owner) { |
+void BrowserActionsContainer::SetPopupOwner(BrowserActionView* popup_owner) { |
// We should never be setting a popup owner when one already exists. |
DCHECK(!popup_owner_ || !popup_owner); |
popup_owner_ = popup_owner; |
@@ -525,7 +525,7 @@ int BrowserActionsContainer::OnPerformDrop( |
return ui::DragDropTypes::DRAG_NONE; |
// Make sure we have the same view as we started with. |
- DCHECK_EQ(browser_action_views_[data.index()]->button()->extension()->id(), |
+ DCHECK_EQ(browser_action_views_[data.index()]->extension()->id(), |
data.id()); |
DCHECK(model_); |
@@ -545,7 +545,7 @@ int BrowserActionsContainer::OnPerformDrop( |
i = model_->IncognitoIndexToOriginal(i); |
model_->MoveBrowserAction( |
- browser_action_views_[data.index()]->button()->extension(), i); |
+ browser_action_views_[data.index()]->extension(), i); |
OnDragExited(); // Perform clean up after dragging. |
FOR_EACH_OBSERVER(BrowserActionsContainerObserver, |
@@ -581,17 +581,16 @@ void BrowserActionsContainer::WriteDragDataForView(View* sender, |
DCHECK(data); |
for (size_t i = 0; i < browser_action_views_.size(); ++i) { |
- BrowserActionButton* button = browser_action_views_[i]->button(); |
- if (button == sender) { |
+ BrowserActionView* view = browser_action_views_[i]; |
+ if (view == sender) { |
// Set the dragging image for the icon. |
- gfx::ImageSkia badge(browser_action_views_[i]->GetIconWithBadge()); |
+ gfx::ImageSkia badge(view->GetIconWithBadge()); |
drag_utils::SetDragImageOnDataObject(badge, |
press_pt.OffsetFromOrigin(), |
data); |
// Fill in the remaining info. |
- BrowserActionDragData drag_data( |
- browser_action_views_[i]->button()->extension()->id(), i); |
+ BrowserActionDragData drag_data(view->extension()->id(), i); |
drag_data.Write(profile_, data); |
break; |
} |
@@ -793,7 +792,7 @@ void BrowserActionsContainer::BrowserActionAdded(const Extension* extension, |
int index) { |
#if defined(DEBUG) |
for (size_t i = 0; i < browser_action_views_.size(); ++i) { |
- DCHECK(browser_action_views_[i]->button()->extension() != extension) << |
+ DCHECK(browser_action_views_[i]->extension() != extension) << |
"Asked to add a browser action view for an extension that already " |
"exists."; |
} |
@@ -835,7 +834,7 @@ void BrowserActionsContainer::BrowserActionRemoved(const Extension* extension) { |
size_t visible_actions = VisibleBrowserActionsAfterAnimation(); |
for (BrowserActionViews::iterator i(browser_action_views_.begin()); |
i != browser_action_views_.end(); ++i) { |
- if ((*i)->button()->extension() == extension) { |
+ if ((*i)->extension() == extension) { |
delete *i; |
browser_action_views_.erase(i); |
@@ -1045,9 +1044,9 @@ bool BrowserActionsContainer::ShowPopupForExtension( |
for (BrowserActionViews::iterator iter = browser_action_views_.begin(); |
iter != browser_action_views_.end(); ++iter) { |
- BrowserActionButton* button = (*iter)->button(); |
- if (button->extension() == extension) |
- return button->view_controller()->ExecuteAction( |
+ BrowserActionView* view = (*iter); |
+ if (view->extension() == extension) |
+ return view->view_controller()->ExecuteAction( |
ExtensionPopup::SHOW, grant_tab_permissions); |
} |
return false; |