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

Side by Side Diff: chrome/browser/ui/views/passwords/account_chooser_dialog_view.h

Issue 2785683003: views: implement width snapping for DialogDelegateViews (Closed)
Patch Set: Created 3 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 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 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_ACCOUNT_CHOOSER_DIALOG_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_ACCOUNT_CHOOSER_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_ACCOUNT_CHOOSER_DIALOG_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_ACCOUNT_CHOOSER_DIALOG_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/passwords/password_dialog_prompts.h" 9 #include "chrome/browser/ui/passwords/password_dialog_prompts.h"
10 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
(...skipping 26 matching lines...) Expand all
37 bool ShouldShowWindowTitle() const override; 37 bool ShouldShowWindowTitle() const override;
38 bool ShouldShowCloseButton() const override; 38 bool ShouldShowCloseButton() const override;
39 void WindowClosing() override; 39 void WindowClosing() override;
40 40
41 // DialogDelegate: 41 // DialogDelegate:
42 bool Accept() override; 42 bool Accept() override;
43 int GetDialogButtons() const override; 43 int GetDialogButtons() const override;
44 bool ShouldDefaultButtonBeBlue() const override; 44 bool ShouldDefaultButtonBeBlue() const override;
45 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 45 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
46 46
47 // views::View 47 // DialogDelegateView
Peter Kasting 2017/03/30 00:35:35 Nit: Combine this group with the two above (class
48 gfx::Size GetPreferredSize() const override; 48 gfx::Size GetUnsnappedPreferredSize() const override;
49 49
50 // StyledLabelListener: 50 // StyledLabelListener:
51 void StyledLabelLinkClicked(views::StyledLabel* label, 51 void StyledLabelLinkClicked(views::StyledLabel* label,
52 const gfx::Range& range, 52 const gfx::Range& range,
53 int event_flags) override; 53 int event_flags) override;
54 54
55 // ButtonListener: 55 // ButtonListener:
56 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 56 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
57 57
58 // Sets up the child views. 58 // Sets up the child views.
59 void InitWindow(); 59 void InitWindow();
60 60
61 // A weak pointer to the controller. 61 // A weak pointer to the controller.
62 PasswordDialogController* controller_; 62 PasswordDialogController* controller_;
63 content::WebContents* web_contents_; 63 content::WebContents* web_contents_;
64 // The "Sign in" button is shown for one credential only. The variable is 64 // The "Sign in" button is shown for one credential only. The variable is
65 // cached because the framework can call GetDialogButtons() after the 65 // cached because the framework can call GetDialogButtons() after the
66 // controller is gone. 66 // controller is gone.
67 bool show_signin_button_; 67 bool show_signin_button_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogView); 69 DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogView);
70 }; 70 };
71 71
72 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_ACCOUNT_CHOOSER_DIALOG_VIEW_H_ 72 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_ACCOUNT_CHOOSER_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698