| OLD | NEW |
| 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 23 matching lines...) Expand all Loading... |
| 34 // WidgetDelegate: | 34 // WidgetDelegate: |
| 35 ui::ModalType GetModalType() const override; | 35 ui::ModalType GetModalType() const override; |
| 36 base::string16 GetWindowTitle() const override; | 36 base::string16 GetWindowTitle() const override; |
| 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; | |
| 45 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; | 44 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| 46 | 45 |
| 47 // views::View | 46 // views::View |
| 48 gfx::Size CalculatePreferredSize() const override; | 47 gfx::Size CalculatePreferredSize() const override; |
| 49 | 48 |
| 50 // StyledLabelListener: | 49 // StyledLabelListener: |
| 51 void StyledLabelLinkClicked(views::StyledLabel* label, | 50 void StyledLabelLinkClicked(views::StyledLabel* label, |
| 52 const gfx::Range& range, | 51 const gfx::Range& range, |
| 53 int event_flags) override; | 52 int event_flags) override; |
| 54 | 53 |
| 55 // ButtonListener: | 54 // ButtonListener: |
| 56 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | 55 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| 57 | 56 |
| 58 // Sets up the child views. | 57 // Sets up the child views. |
| 59 void InitWindow(); | 58 void InitWindow(); |
| 60 | 59 |
| 61 // A weak pointer to the controller. | 60 // A weak pointer to the controller. |
| 62 PasswordDialogController* controller_; | 61 PasswordDialogController* controller_; |
| 63 content::WebContents* web_contents_; | 62 content::WebContents* web_contents_; |
| 64 // The "Sign in" button is shown for one credential only. The variable is | 63 // The "Sign in" button is shown for one credential only. The variable is |
| 65 // cached because the framework can call GetDialogButtons() after the | 64 // cached because the framework can call GetDialogButtons() after the |
| 66 // controller is gone. | 65 // controller is gone. |
| 67 bool show_signin_button_; | 66 bool show_signin_button_; |
| 68 | 67 |
| 69 DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogView); | 68 DISALLOW_COPY_AND_ASSIGN(AccountChooserDialogView); |
| 70 }; | 69 }; |
| 71 | 70 |
| 72 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_ACCOUNT_CHOOSER_DIALOG_VIEW_H_ | 71 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_ACCOUNT_CHOOSER_DIALOG_VIEW_H_ |
| OLD | NEW |