| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" | 8 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 class NavigationController; | 11 class NavigationController; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Point; | 15 class Point; |
| 16 class Size; | 16 class Size; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace autofill { | 19 namespace autofill { |
| 20 | 20 |
| 21 class AutofillDialogViewDelegate; | 21 class AutofillDialogViewDelegate; |
| 22 class TestableAutofillDialogView; | |
| 23 | 22 |
| 24 // An interface for the dialog that appears when a site initiates an Autofill | 23 // An interface for the dialog that appears when a site initiates an Autofill |
| 25 // action via the imperative autocomplete API. | 24 // action via the imperative autocomplete API. |
| 26 class AutofillDialogView { | 25 class AutofillDialogView { |
| 27 public: | 26 public: |
| 28 virtual ~AutofillDialogView(); | 27 virtual ~AutofillDialogView(); |
| 29 | 28 |
| 30 // Shows the dialog. | 29 // Shows the dialog. |
| 31 virtual void Show() = 0; | 30 virtual void Show() = 0; |
| 32 | 31 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // Triggers dialog to sign in to Google. | 90 // Triggers dialog to sign in to Google. |
| 92 // Returns a NotificationSource to be used to monitor for sign-in completion. | 91 // Returns a NotificationSource to be used to monitor for sign-in completion. |
| 93 virtual const content::NavigationController* ShowSignIn() = 0; | 92 virtual const content::NavigationController* ShowSignIn() = 0; |
| 94 | 93 |
| 95 // Closes out any sign-in UI and returns to normal operation. | 94 // Closes out any sign-in UI and returns to normal operation. |
| 96 virtual void HideSignIn() = 0; | 95 virtual void HideSignIn() = 0; |
| 97 | 96 |
| 98 // Called when the active suggestions data model changed. | 97 // Called when the active suggestions data model changed. |
| 99 virtual void ModelChanged() = 0; | 98 virtual void ModelChanged() = 0; |
| 100 | 99 |
| 101 // Returns an object that can be used to test that the view is behaving as | |
| 102 // expected. | |
| 103 virtual TestableAutofillDialogView* GetTestableView() = 0; | |
| 104 | |
| 105 // Called by AutofillDialogSignInDelegate when the sign-in page experiences a | 100 // Called by AutofillDialogSignInDelegate when the sign-in page experiences a |
| 106 // resize. |pref_size| is the new preferred size of the sign-in page. | 101 // resize. |pref_size| is the new preferred size of the sign-in page. |
| 107 virtual void OnSignInResize(const gfx::Size& pref_size) = 0; | 102 virtual void OnSignInResize(const gfx::Size& pref_size) = 0; |
| 108 | 103 |
| 109 // Factory function to create the dialog (implemented once per view | 104 // Factory function to create the dialog (implemented once per view |
| 110 // implementation). |controller| will own the created dialog. | 105 // implementation). |controller| will own the created dialog. |
| 111 static AutofillDialogView* Create(AutofillDialogViewDelegate* delegate); | 106 static AutofillDialogView* Create(AutofillDialogViewDelegate* delegate); |
| 112 }; | 107 }; |
| 113 | 108 |
| 114 } // namespace autofill | 109 } // namespace autofill |
| 115 | 110 |
| 116 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ | 111 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_VIEW_H_ |
| OLD | NEW |