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

Side by Side Diff: chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/website_settings/chooser_bubble_ui_view.h" 5 #include "chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 21 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
22 #include "chrome/browser/ui/views/location_bar/location_icon_view.h" 22 #include "chrome/browser/ui/views/location_bar/location_icon_view.h"
23 #include "chrome/browser/ui/website_settings/chooser_bubble_delegate.h" 23 #include "chrome/browser/ui/website_settings/chooser_bubble_delegate.h"
24 #include "components/bubble/bubble_controller.h" 24 #include "components/bubble/bubble_controller.h"
25 #include "ui/views/controls/link.h" 25 #include "ui/views/controls/link.h"
26 #include "ui/views/controls/styled_label.h" 26 #include "ui/views/controls/styled_label.h"
27 #include "ui/views/controls/table/table_view_observer.h" 27 #include "ui/views/controls/table/table_view_observer.h"
28 #include "ui/views/window/dialog_client_view.h" 28 #include "ui/views/window/dialog_client_view.h"
29 29
30 std::unique_ptr<BubbleUi> ChooserBubbleDelegate::BuildBubbleUi() { 30 std::unique_ptr<BubbleUi> ChooserBubbleDelegate::BuildBubbleUi() {
31 return base::WrapUnique( 31 return base::MakeUnique<ChooserBubbleUiView>(browser_,
32 new ChooserBubbleUiView(browser_, std::move(chooser_controller_))); 32 std::move(chooser_controller_));
33 } 33 }
34 34
35 /////////////////////////////////////////////////////////////////////////////// 35 ///////////////////////////////////////////////////////////////////////////////
36 // View implementation for the chooser bubble. 36 // View implementation for the chooser bubble.
37 class ChooserBubbleUiViewDelegate : public views::BubbleDialogDelegateView, 37 class ChooserBubbleUiViewDelegate : public views::BubbleDialogDelegateView,
38 public views::TableViewObserver { 38 public views::TableViewObserver {
39 public: 39 public:
40 ChooserBubbleUiViewDelegate( 40 ChooserBubbleUiViewDelegate(
41 views::View* anchor_view, 41 views::View* anchor_view,
42 views::BubbleBorder::Arrow anchor_arrow, 42 views::BubbleBorder::Arrow anchor_arrow,
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return browser_view->exclusive_access_bubble()->GetView(); 228 return browser_view->exclusive_access_bubble()->GetView();
229 229
230 return browser_view->top_container(); 230 return browser_view->top_container();
231 } 231 }
232 232
233 views::BubbleBorder::Arrow ChooserBubbleUiView::GetAnchorArrow() { 233 views::BubbleBorder::Arrow ChooserBubbleUiView::GetAnchorArrow() {
234 if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR)) 234 if (browser_->SupportsWindowFeature(Browser::FEATURE_LOCATIONBAR))
235 return views::BubbleBorder::TOP_LEFT; 235 return views::BubbleBorder::TOP_LEFT;
236 return views::BubbleBorder::NONE; 236 return views::BubbleBorder::NONE;
237 } 237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698