| OLD | NEW |
| 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_DOWNLOAD_DOWNLOAD_FEEDBACK_DIALOG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_FEEDBACK_DIALOG_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_FEEDBACK_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_FEEDBACK_DIALOG_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 gfx::NativeWindow parent_window, | 35 gfx::NativeWindow parent_window, |
| 36 Profile* profile, | 36 Profile* profile, |
| 37 content::PageNavigator* navigator, | 37 content::PageNavigator* navigator, |
| 38 const UserDecisionCallback& callback); | 38 const UserDecisionCallback& callback); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 DownloadFeedbackDialogView( | 41 DownloadFeedbackDialogView( |
| 42 Profile* profile, | 42 Profile* profile, |
| 43 content::PageNavigator* navigator, | 43 content::PageNavigator* navigator, |
| 44 const UserDecisionCallback& callback); | 44 const UserDecisionCallback& callback); |
| 45 virtual ~DownloadFeedbackDialogView(); | 45 ~DownloadFeedbackDialogView() override; |
| 46 | 46 |
| 47 // Handles the user's decision. | 47 // Handles the user's decision. |
| 48 bool OnButtonClicked(bool accepted); | 48 bool OnButtonClicked(bool accepted); |
| 49 | 49 |
| 50 // views::DialogDelegate: | 50 // views::DialogDelegate: |
| 51 virtual ui::ModalType GetModalType() const override; | 51 ui::ModalType GetModalType() const override; |
| 52 virtual base::string16 GetWindowTitle() const override; | 52 base::string16 GetWindowTitle() const override; |
| 53 virtual void DeleteDelegate() override; | 53 void DeleteDelegate() override; |
| 54 virtual views::Widget* GetWidget() override; | 54 views::Widget* GetWidget() override; |
| 55 virtual const views::Widget* GetWidget() const override; | 55 const views::Widget* GetWidget() const override; |
| 56 virtual views::View* GetContentsView() override; | 56 views::View* GetContentsView() override; |
| 57 virtual int GetDefaultDialogButton() const override; | 57 int GetDefaultDialogButton() const override; |
| 58 virtual base::string16 GetDialogButtonLabel( | 58 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; |
| 59 ui::DialogButton button) const override; | 59 bool Cancel() override; |
| 60 virtual bool Cancel() override; | 60 bool Accept() override; |
| 61 virtual bool Accept() override; | 61 views::View* CreateExtraView() override; |
| 62 virtual views::View* CreateExtraView() override; | |
| 63 | 62 |
| 64 // views::LinkListener: | 63 // views::LinkListener: |
| 65 virtual void LinkClicked(views::Link* source, int event_flags) override; | 64 void LinkClicked(views::Link* source, int event_flags) override; |
| 66 | 65 |
| 67 Profile* profile_; | 66 Profile* profile_; |
| 68 content::PageNavigator* navigator_; | 67 content::PageNavigator* navigator_; |
| 69 const UserDecisionCallback callback_; | 68 const UserDecisionCallback callback_; |
| 70 views::MessageBoxView* explanation_box_view_; | 69 views::MessageBoxView* explanation_box_view_; |
| 71 views::Link* link_view_; | 70 views::Link* link_view_; |
| 72 base::string16 title_text_; | 71 base::string16 title_text_; |
| 73 base::string16 ok_button_text_; | 72 base::string16 ok_button_text_; |
| 74 base::string16 cancel_button_text_; | 73 base::string16 cancel_button_text_; |
| 75 | 74 |
| 76 DISALLOW_COPY_AND_ASSIGN(DownloadFeedbackDialogView); | 75 DISALLOW_COPY_AND_ASSIGN(DownloadFeedbackDialogView); |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_FEEDBACK_DIALOG_VIEW_H_ | 78 #endif // CHROME_BROWSER_UI_VIEWS_DOWNLOAD_DOWNLOAD_FEEDBACK_DIALOG_VIEW_H_ |
| OLD | NEW |