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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/toolbar_actions_bar_bubble_views.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_actions_bar_bubble_views.h"
6 6
7 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h" 7 #include "chrome/browser/ui/toolbar/toolbar_actions_bar_bubble_delegate.h"
8 #include "chrome/grit/locale_settings.h" 8 #include "chrome/grit/locale_settings.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/views/controls/button/label_button.h" 10 #include "ui/views/controls/button/label_button.h"
11 #include "ui/views/controls/label.h" 11 #include "ui/views/controls/label.h"
12 #include "ui/views/layout/grid_layout.h" 12 #include "ui/views/layout/grid_layout.h"
13 #include "ui/views/layout/layout_constants.h" 13 #include "ui/views/layout/layout_constants.h"
14 14
15 ToolbarActionsBarBubbleViews::ToolbarActionsBarBubbleViews( 15 ToolbarActionsBarBubbleViews::ToolbarActionsBarBubbleViews(
16 views::View* anchor_view, 16 views::View* anchor_view,
17 scoped_ptr<ToolbarActionsBarBubbleDelegate> delegate) 17 std::unique_ptr<ToolbarActionsBarBubbleDelegate> delegate)
18 : views::BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), 18 : views::BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
19 delegate_(std::move(delegate)), 19 delegate_(std::move(delegate)),
20 heading_label_(nullptr), 20 heading_label_(nullptr),
21 content_label_(nullptr), 21 content_label_(nullptr),
22 dismiss_button_(nullptr), 22 dismiss_button_(nullptr),
23 action_button_(nullptr), 23 action_button_(nullptr),
24 acknowledged_(false) {} 24 acknowledged_(false) {}
25 25
26 ToolbarActionsBarBubbleViews::~ToolbarActionsBarBubbleViews() {} 26 ToolbarActionsBarBubbleViews::~ToolbarActionsBarBubbleViews() {}
27 27
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 acknowledged_ = true; 104 acknowledged_ = true;
105 } 105 }
106 } 106 }
107 107
108 void ToolbarActionsBarBubbleViews::ButtonPressed(views::Button* sender, 108 void ToolbarActionsBarBubbleViews::ButtonPressed(views::Button* sender,
109 const ui::Event& event) { 109 const ui::Event& event) {
110 delegate_->OnBubbleClosed(ToolbarActionsBarBubbleDelegate::CLOSE_EXECUTE); 110 delegate_->OnBubbleClosed(ToolbarActionsBarBubbleDelegate::CLOSE_EXECUTE);
111 acknowledged_ = true; 111 acknowledged_ = true;
112 GetWidget()->Close(); 112 GetWidget()->Close();
113 } 113 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698