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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_install_dialog_view.h

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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/extensions/extension_install_prompt.h" 9 #include "chrome/browser/extensions/extension_install_prompt.h"
10 #include "ui/gfx/animation/animation_delegate.h" 10 #include "ui/gfx/animation/animation_delegate.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 // Implements the extension installation dialog for TOOLKIT_VIEWS. 38 // Implements the extension installation dialog for TOOLKIT_VIEWS.
39 class ExtensionInstallDialogView : public views::DialogDelegateView, 39 class ExtensionInstallDialogView : public views::DialogDelegateView,
40 public views::LinkListener { 40 public views::LinkListener {
41 public: 41 public:
42 ExtensionInstallDialogView( 42 ExtensionInstallDialogView(
43 Profile* profile, 43 Profile* profile,
44 content::PageNavigator* navigator, 44 content::PageNavigator* navigator,
45 const ExtensionInstallPrompt::DoneCallback& done_callback, 45 const ExtensionInstallPrompt::DoneCallback& done_callback,
46 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt); 46 std::unique_ptr<ExtensionInstallPrompt::Prompt> prompt);
47 ~ExtensionInstallDialogView() override; 47 ~ExtensionInstallDialogView() override;
48 48
49 // Returns the interior ScrollView of the dialog. This allows us to inspect 49 // Returns the interior ScrollView of the dialog. This allows us to inspect
50 // the contents of the DialogView. 50 // the contents of the DialogView.
51 const views::ScrollView* scroll_view() const { return scroll_view_; } 51 const views::ScrollView* scroll_view() const { return scroll_view_; }
52 52
53 private: 53 private:
54 // views::DialogDelegateView: 54 // views::DialogDelegateView:
55 int GetDialogButtons() const override; 55 int GetDialogButtons() const override;
56 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 56 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
(...skipping 29 matching lines...) Expand all
86 bool is_external_install() const { 86 bool is_external_install() const {
87 return prompt_->type() == ExtensionInstallPrompt::EXTERNAL_INSTALL_PROMPT; 87 return prompt_->type() == ExtensionInstallPrompt::EXTERNAL_INSTALL_PROMPT;
88 } 88 }
89 89
90 // Updates the histogram that holds installation accepted/aborted data. 90 // Updates the histogram that holds installation accepted/aborted data.
91 void UpdateInstallResultHistogram(bool accepted) const; 91 void UpdateInstallResultHistogram(bool accepted) const;
92 92
93 Profile* profile_; 93 Profile* profile_;
94 content::PageNavigator* navigator_; 94 content::PageNavigator* navigator_;
95 ExtensionInstallPrompt::DoneCallback done_callback_; 95 ExtensionInstallPrompt::DoneCallback done_callback_;
96 scoped_ptr<ExtensionInstallPrompt::Prompt> prompt_; 96 std::unique_ptr<ExtensionInstallPrompt::Prompt> prompt_;
97 97
98 // The container view that contains all children (heading, icon, webstore 98 // The container view that contains all children (heading, icon, webstore
99 // data, and the scroll view with permissions etc.), excluding the buttons, 99 // data, and the scroll view with permissions etc.), excluding the buttons,
100 // which are added automatically by the dialog system. 100 // which are added automatically by the dialog system.
101 View* container_; 101 View* container_;
102 102
103 // The scroll view containing all the details for the dialog (including all 103 // The scroll view containing all the details for the dialog (including all
104 // collapsible/expandable sections). 104 // collapsible/expandable sections).
105 views::ScrollView* scroll_view_; 105 views::ScrollView* scroll_view_;
106 106
107 // The preferred size of the dialog. 107 // The preferred size of the dialog.
108 gfx::Size dialog_size_; 108 gfx::Size dialog_size_;
109 109
110 // ExperienceSampling: Track this UI event. 110 // ExperienceSampling: Track this UI event.
111 scoped_ptr<extensions::ExperienceSamplingEvent> sampling_event_; 111 std::unique_ptr<extensions::ExperienceSamplingEvent> sampling_event_;
112 112
113 // Set to true once the user's selection has been received and the callback 113 // Set to true once the user's selection has been received and the callback
114 // has been run. 114 // has been run.
115 bool handled_result_; 115 bool handled_result_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallDialogView); 117 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallDialogView);
118 }; 118 };
119 119
120 // A simple view that prepends a view with a bullet with the help of a grid 120 // A simple view that prepends a view with a bullet with the help of a grid
121 // layout. 121 // layout.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // on whether the details section is expanded). 205 // on whether the details section is expanded).
206 views::ImageButton* arrow_toggle_; 206 views::ImageButton* arrow_toggle_;
207 207
208 // Whether the details section is expanded. 208 // Whether the details section is expanded.
209 bool expanded_; 209 bool expanded_;
210 210
211 DISALLOW_COPY_AND_ASSIGN(ExpandableContainerView); 211 DISALLOW_COPY_AND_ASSIGN(ExpandableContainerView);
212 }; 212 };
213 213
214 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_ 214 #endif // CHROME_BROWSER_UI_VIEWS_EXTENSIONS_EXTENSION_INSTALL_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698