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

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

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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>
8
7 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
8 #include "base/stl_util.h" 10 #include "base/stl_util.h"
9 #include "chrome/browser/extensions/extension_message_bubble_controller.h" 11 #include "chrome/browser/extensions/extension_message_bubble_controller.h"
10 #include "chrome/browser/extensions/tab_helper.h" 12 #include "chrome/browser/extensions/tab_helper.h"
11 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/extensions/extension_toolbar_icon_surfacing_bubble_d elegate.h" 15 #include "chrome/browser/ui/extensions/extension_toolbar_icon_surfacing_bubble_d elegate.h"
14 #include "chrome/browser/ui/layout_constants.h" 16 #include "chrome/browser/ui/layout_constants.h"
15 #include "chrome/browser/ui/tabs/tab_strip_model.h" 17 #include "chrome/browser/ui/tabs/tab_strip_model.h"
16 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" 18 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 DCHECK(!animating()); 334 DCHECK(!animating());
333 335
334 views::View* reference_view = 336 views::View* reference_view =
335 anchor_action 337 anchor_action
336 ? static_cast<views::View*>(GetViewForId(anchor_action->GetId())) 338 ? static_cast<views::View*>(GetViewForId(anchor_action->GetId()))
337 : BrowserView::GetBrowserViewForBrowser(browser_) 339 : BrowserView::GetBrowserViewForBrowser(browser_)
338 ->toolbar() 340 ->toolbar()
339 ->app_menu_button(); 341 ->app_menu_button();
340 342
341 extensions::ExtensionMessageBubbleView* bubble = 343 extensions::ExtensionMessageBubbleView* bubble =
342 new extensions::ExtensionMessageBubbleView( 344 new extensions::ExtensionMessageBubbleView(reference_view,
343 reference_view, 345 views::BubbleBorder::TOP_RIGHT,
344 views::BubbleBorder::TOP_RIGHT, 346 std::move(controller));
345 controller.Pass());
346 views::BubbleDelegateView::CreateBubble(bubble); 347 views::BubbleDelegateView::CreateBubble(bubble);
347 active_bubble_ = bubble; 348 active_bubble_ = bubble;
348 active_bubble_->GetWidget()->AddObserver(this); 349 active_bubble_->GetWidget()->AddObserver(this);
349 bubble->Show(); 350 bubble->Show();
350 } 351 }
351 352
352 void BrowserActionsContainer::OnWidgetClosing(views::Widget* widget) { 353 void BrowserActionsContainer::OnWidgetClosing(views::Widget* widget) {
353 ClearActiveBubble(widget); 354 ClearActiveBubble(widget);
354 } 355 }
355 356
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 warning_highlight_painter_.reset( 786 warning_highlight_painter_.reset(
786 views::Painter::CreateImageGridPainter(kWarningImages)); 787 views::Painter::CreateImageGridPainter(kWarningImages));
787 } 788 }
788 789
789 void BrowserActionsContainer::ClearActiveBubble(views::Widget* widget) { 790 void BrowserActionsContainer::ClearActiveBubble(views::Widget* widget) {
790 DCHECK(active_bubble_); 791 DCHECK(active_bubble_);
791 DCHECK_EQ(active_bubble_->GetWidget(), widget); 792 DCHECK_EQ(active_bubble_->GetWidget(), widget);
792 widget->RemoveObserver(this); 793 widget->RemoveObserver(this);
793 active_bubble_ = nullptr; 794 active_bubble_ = nullptr;
794 } 795 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/back_button.cc ('k') | chrome/browser/ui/views/toolbar/chevron_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698