OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| 7 |
| 8 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" |
| 9 #include "ui/views/window/dialog_delegate.h" |
| 10 |
| 11 class AutofillDialogController; |
| 12 class ConstrainedWindowViews; |
| 13 |
| 14 // Views toolkit implementation of the Autofill dialog that handles the |
| 15 // imperative autocomplete API call. |
| 16 class AutofillDialogViews : public AutofillDialogView, |
| 17 public views::DialogDelegate { |
| 18 public: |
| 19 explicit AutofillDialogViews(AutofillDialogController* controller); |
| 20 virtual ~AutofillDialogViews(); |
| 21 |
| 22 // AutofillDialogView implementation: |
| 23 virtual void Show() OVERRIDE; |
| 24 |
| 25 // views::DialogDelegate implementation: |
| 26 virtual string16 GetWindowTitle() const OVERRIDE; |
| 27 virtual void DeleteDelegate() OVERRIDE; |
| 28 virtual views::Widget* GetWidget() OVERRIDE; |
| 29 virtual const views::Widget* GetWidget() const OVERRIDE; |
| 30 virtual views::View* GetContentsView() OVERRIDE; |
| 31 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; |
| 32 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; |
| 33 virtual bool UseChromeStyle() const OVERRIDE; |
| 34 virtual bool Cancel() OVERRIDE; |
| 35 virtual bool Accept() OVERRIDE; |
| 36 |
| 37 private: |
| 38 void InitChildViews(); |
| 39 |
| 40 // The controller that drives this view. Weak pointer, always non-NULL. |
| 41 AutofillDialogController* const controller_; |
| 42 |
| 43 // The window that displays |contents_|. Weak pointer; may be NULL when the |
| 44 // dialog is closing. |
| 45 ConstrainedWindowViews* window_; |
| 46 |
| 47 // The top-level View for the dialog. Owned by the constrained window. |
| 48 views::View* contents_; |
| 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
| 51 }; |
| 52 |
| 53 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
OLD | NEW |