| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 struct NativeWebKeyboardEvent; | 25 struct NativeWebKeyboardEvent; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace gfx { | 28 namespace gfx { |
| 29 class Rect; | 29 class Rect; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace ui { | 32 namespace ui { |
| 33 class ComboboxModel; | 33 class ComboboxModel; |
| 34 class MenuModel; | 34 class MenuModel; |
| 35 class NativeTheme; |
| 35 } | 36 } |
| 36 | 37 |
| 37 namespace autofill { | 38 namespace autofill { |
| 38 | 39 |
| 39 typedef std::map<ServerFieldType, gfx::Image> FieldIconMap; | 40 typedef std::map<ServerFieldType, gfx::Image> FieldIconMap; |
| 40 | 41 |
| 41 // This class defines the interface to the controller that the dialog view sees. | 42 // This class defines the interface to the controller that the dialog view sees. |
| 42 class AutofillDialogViewDelegate { | 43 class AutofillDialogViewDelegate { |
| 43 public: | 44 public: |
| 44 // Strings ------------------------------------------------------------------- | 45 // Strings ------------------------------------------------------------------- |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 virtual gfx::Image ButtonStripImage() const = 0; | 86 virtual gfx::Image ButtonStripImage() const = 0; |
| 86 | 87 |
| 87 // Which dialog buttons should be visible. | 88 // Which dialog buttons should be visible. |
| 88 virtual int GetDialogButtons() const = 0; | 89 virtual int GetDialogButtons() const = 0; |
| 89 | 90 |
| 90 // Whether or not the |button| should be enabled. | 91 // Whether or not the |button| should be enabled. |
| 91 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; | 92 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const = 0; |
| 92 | 93 |
| 93 // Returns a struct full of data concerning what overlay, if any, should be | 94 // Returns a struct full of data concerning what overlay, if any, should be |
| 94 // displayed on top of the dialog. | 95 // displayed on top of the dialog. |
| 95 virtual DialogOverlayState GetDialogOverlay() = 0; | 96 virtual DialogOverlayState GetDialogOverlay(const ui::NativeTheme* theme) = 0; |
| 96 | 97 |
| 97 // Returns ranges to linkify in the text returned by |LegalDocumentsText()|. | 98 // Returns ranges to linkify in the text returned by |LegalDocumentsText()|. |
| 98 virtual const std::vector<gfx::Range>& LegalDocumentLinks() = 0; | 99 virtual const std::vector<gfx::Range>& LegalDocumentLinks() = 0; |
| 99 | 100 |
| 100 // Detail inputs ------------------------------------------------------------- | 101 // Detail inputs ------------------------------------------------------------- |
| 101 | 102 |
| 102 // Whether the section is currently active (i.e. should be shown). | 103 // Whether the section is currently active (i.e. should be shown). |
| 103 virtual bool SectionIsActive(DialogSection section) const = 0; | 104 virtual bool SectionIsActive(DialogSection section) const = 0; |
| 104 | 105 |
| 105 // Returns the set of inputs the page has requested which fall under | 106 // Returns the set of inputs the page has requested which fall under |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // The web contents that prompted the dialog. | 212 // The web contents that prompted the dialog. |
| 212 virtual content::WebContents* GetWebContents() = 0; | 213 virtual content::WebContents* GetWebContents() = 0; |
| 213 | 214 |
| 214 protected: | 215 protected: |
| 215 virtual ~AutofillDialogViewDelegate(); | 216 virtual ~AutofillDialogViewDelegate(); |
| 216 }; | 217 }; |
| 217 | 218 |
| 218 } // namespace autofill | 219 } // namespace autofill |
| 219 | 220 |
| 220 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ | 221 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_DELEGATE_H_ |
| OLD | NEW |