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

Side by Side Diff: chrome/browser/ui/views/toolbar/browser_actions_container.cc

Issue 2857653002: Fix BrowserActionsBarBrowserTest.OverflowedBrowserActionPopupTestRemoval in ASan with new libc++. (Closed)
Patch Set: worse! Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_bar.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" 5 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 toolbar_action_views_.insert(toolbar_action_views_.begin() + index, 164 toolbar_action_views_.insert(toolbar_action_views_.begin() + index,
165 base::WrapUnique(view)); 165 base::WrapUnique(view));
166 AddChildViewAt(view, index); 166 AddChildViewAt(view, index);
167 } 167 }
168 168
169 void BrowserActionsContainer::RemoveViewForAction( 169 void BrowserActionsContainer::RemoveViewForAction(
170 ToolbarActionViewController* action) { 170 ToolbarActionViewController* action) {
171 for (ToolbarActionViews::iterator iter = toolbar_action_views_.begin(); 171 for (ToolbarActionViews::iterator iter = toolbar_action_views_.begin();
172 iter != toolbar_action_views_.end(); ++iter) { 172 iter != toolbar_action_views_.end(); ++iter) {
173 if ((*iter)->view_controller() == action) { 173 if ((*iter)->view_controller() == action) {
174 action->HidePopup();
174 toolbar_action_views_.erase(iter); 175 toolbar_action_views_.erase(iter);
175 break; 176 break;
176 } 177 }
177 } 178 }
178 } 179 }
179 180
180 void BrowserActionsContainer::RemoveAllViews() { 181 void BrowserActionsContainer::RemoveAllViews() {
181 toolbar_action_views_.clear(); 182 toolbar_action_views_.clear();
182 } 183 }
183 184
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 } 659 }
659 } 660 }
660 661
661 void BrowserActionsContainer::ClearActiveBubble(views::Widget* widget) { 662 void BrowserActionsContainer::ClearActiveBubble(views::Widget* widget) {
662 DCHECK(active_bubble_); 663 DCHECK(active_bubble_);
663 DCHECK_EQ(active_bubble_->GetWidget(), widget); 664 DCHECK_EQ(active_bubble_->GetWidget(), widget);
664 widget->RemoveObserver(this); 665 widget->RemoveObserver(this);
665 active_bubble_ = nullptr; 666 active_bubble_ = nullptr;
666 toolbar_actions_bar_->OnBubbleClosed(); 667 toolbar_actions_bar_->OnBubbleClosed();
667 } 668 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_actions_bar.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698