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

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

Issue 1573843002: Make `chrome` target build without unused data members on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@content_target
Patch Set: browsertest fix Created 4 years, 11 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
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/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } 216 }
217 shown_bubble_ = true; 217 shown_bubble_ = true;
218 } 218 }
219 219
220 void BrowserActionsContainer::AddViewForAction( 220 void BrowserActionsContainer::AddViewForAction(
221 ToolbarActionViewController* view_controller, 221 ToolbarActionViewController* view_controller,
222 size_t index) { 222 size_t index) {
223 if (chevron_) 223 if (chevron_)
224 chevron_->CloseMenu(); 224 chevron_->CloseMenu();
225 225
226 ToolbarActionView* view = 226 ToolbarActionView* view = new ToolbarActionView(view_controller, this);
227 new ToolbarActionView(view_controller, browser_->profile(), this);
228 toolbar_action_views_.insert(toolbar_action_views_.begin() + index, view); 227 toolbar_action_views_.insert(toolbar_action_views_.begin() + index, view);
229 AddChildViewAt(view, index); 228 AddChildViewAt(view, index);
230 } 229 }
231 230
232 void BrowserActionsContainer::RemoveViewForAction( 231 void BrowserActionsContainer::RemoveViewForAction(
233 ToolbarActionViewController* action) { 232 ToolbarActionViewController* action) {
234 if (chevron_) 233 if (chevron_)
235 chevron_->CloseMenu(); 234 chevron_->CloseMenu();
236 235
237 for (ToolbarActionViews::iterator iter = toolbar_action_views_.begin(); 236 for (ToolbarActionViews::iterator iter = toolbar_action_views_.begin();
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 warning_highlight_painter_.reset( 788 warning_highlight_painter_.reset(
790 views::Painter::CreateImageGridPainter(kWarningImages)); 789 views::Painter::CreateImageGridPainter(kWarningImages));
791 } 790 }
792 791
793 void BrowserActionsContainer::ClearActiveBubble(views::Widget* widget) { 792 void BrowserActionsContainer::ClearActiveBubble(views::Widget* widget) {
794 DCHECK(active_bubble_); 793 DCHECK(active_bubble_);
795 DCHECK_EQ(active_bubble_->GetWidget(), widget); 794 DCHECK_EQ(active_bubble_->GetWidget(), widget);
796 widget->RemoveObserver(this); 795 widget->RemoveObserver(this);
797 active_bubble_ = nullptr; 796 active_bubble_ = nullptr;
798 } 797 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698