| 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_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual void UpdateNotificationArea() OVERRIDE; | 68 virtual void UpdateNotificationArea() OVERRIDE; |
| 69 virtual void UpdateSection(DialogSection section) OVERRIDE; | 69 virtual void UpdateSection(DialogSection section) OVERRIDE; |
| 70 virtual void GetUserInput(DialogSection section, | 70 virtual void GetUserInput(DialogSection section, |
| 71 DetailOutputMap* output) OVERRIDE; | 71 DetailOutputMap* output) OVERRIDE; |
| 72 virtual string16 GetCvc() OVERRIDE; | 72 virtual string16 GetCvc() OVERRIDE; |
| 73 virtual bool UseBillingForShipping() OVERRIDE; | 73 virtual bool UseBillingForShipping() OVERRIDE; |
| 74 virtual bool SaveDetailsLocally() OVERRIDE; | 74 virtual bool SaveDetailsLocally() OVERRIDE; |
| 75 virtual const content::NavigationController& ShowSignIn() OVERRIDE; | 75 virtual const content::NavigationController& ShowSignIn() OVERRIDE; |
| 76 virtual void HideSignIn() OVERRIDE; | 76 virtual void HideSignIn() OVERRIDE; |
| 77 virtual void UpdateProgressBar(double value) OVERRIDE; | 77 virtual void UpdateProgressBar(double value) OVERRIDE; |
| 78 virtual void UpdateFootnote() OVERRIDE; |
| 78 | 79 |
| 79 // views::DialogDelegate implementation: | 80 // views::DialogDelegate implementation: |
| 80 virtual string16 GetWindowTitle() const OVERRIDE; | 81 virtual string16 GetWindowTitle() const OVERRIDE; |
| 81 virtual void WindowClosing() OVERRIDE; | 82 virtual void WindowClosing() OVERRIDE; |
| 82 virtual void DeleteDelegate() OVERRIDE; | 83 virtual void DeleteDelegate() OVERRIDE; |
| 83 virtual views::Widget* GetWidget() OVERRIDE; | 84 virtual views::Widget* GetWidget() OVERRIDE; |
| 84 virtual const views::Widget* GetWidget() const OVERRIDE; | 85 virtual const views::Widget* GetWidget() const OVERRIDE; |
| 85 virtual views::View* GetContentsView() OVERRIDE; | 86 virtual views::View* GetContentsView() OVERRIDE; |
| 86 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | 87 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; |
| 87 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; | 88 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 typedef std::map<DialogSection, DetailsGroup> DetailGroupMap; | 264 typedef std::map<DialogSection, DetailsGroup> DetailGroupMap; |
| 264 | 265 |
| 265 void InitChildViews(); | 266 void InitChildViews(); |
| 266 | 267 |
| 267 // Creates and returns a view that holds all detail sections. | 268 // Creates and returns a view that holds all detail sections. |
| 268 views::View* CreateDetailsContainer(); | 269 views::View* CreateDetailsContainer(); |
| 269 | 270 |
| 270 // Creates and returns a view that holds the requesting host and intro text. | 271 // Creates and returns a view that holds the requesting host and intro text. |
| 271 views::View* CreateNotificationArea(); | 272 views::View* CreateNotificationArea(); |
| 272 | 273 |
| 274 // Creates and returns a view that holds the main controls of this dialog. |
| 275 views::View* CreateMainContainer(); |
| 276 |
| 273 // Creates and returns a view that holds a sign in page and related controls. | 277 // Creates and returns a view that holds a sign in page and related controls. |
| 274 views::View* CreateSignInContainer(); | 278 views::View* CreateSignInContainer(); |
| 275 | 279 |
| 276 // Creates and returns a view that holds the main controls of this dialog. | 280 // Creates footnote container. |
| 277 views::View* CreateMainContainer(); | 281 void CreateFootnoteView(); |
| 282 |
| 283 // [Re-]populates footnote links based on the controller's link text parts. |
| 284 void PopulateFootnoteLinks(); |
| 278 | 285 |
| 279 // Creates a detail section (Shipping, Email, etc.) with the given label, | 286 // Creates a detail section (Shipping, Email, etc.) with the given label, |
| 280 // inputs View, and suggestion model. Relevant pointers are stored in |group|. | 287 // inputs View, and suggestion model. Relevant pointers are stored in |group|. |
| 281 void CreateDetailsSection(DialogSection section); | 288 void CreateDetailsSection(DialogSection section); |
| 282 | 289 |
| 283 // Like CreateDetailsSection, but creates the combined billing/cc section, | 290 // Like CreateDetailsSection, but creates the combined billing/cc section, |
| 284 // which is somewhat more complicated than the others. | 291 // which is somewhat more complicated than the others. |
| 285 void CreateBillingSection(); | 292 void CreateBillingSection(); |
| 286 | 293 |
| 287 // Creates the view that holds controls for inputing or selecting data for | 294 // Creates the view that holds controls for inputing or selecting data for |
| (...skipping 19 matching lines...) Expand all Loading... |
| 307 // Checks all manual inputs in the form for validity. Decorates the invalid | 314 // Checks all manual inputs in the form for validity. Decorates the invalid |
| 308 // ones and returns true if all were valid. | 315 // ones and returns true if all were valid. |
| 309 bool ValidateForm(); | 316 bool ValidateForm(); |
| 310 | 317 |
| 311 // When an input textfield is edited (its contents change) or activated | 318 // When an input textfield is edited (its contents change) or activated |
| 312 // (clicked while focused), this function will inform the controller that it's | 319 // (clicked while focused), this function will inform the controller that it's |
| 313 // time to show a suggestion popup and possibly reset the validity state of | 320 // time to show a suggestion popup and possibly reset the validity state of |
| 314 // the input. | 321 // the input. |
| 315 void TextfieldEditedOrActivated(views::Textfield* textfield, bool was_edit); | 322 void TextfieldEditedOrActivated(views::Textfield* textfield, bool was_edit); |
| 316 | 323 |
| 324 // When something inside of |contents_| could've changed in height, call this |
| 325 // to ensure |contents_|' preferred size is correct. |
| 326 void ContentsResized(); |
| 327 |
| 317 // The controller that drives this view. Weak pointer, always non-NULL. | 328 // The controller that drives this view. Weak pointer, always non-NULL. |
| 318 AutofillDialogController* const controller_; | 329 AutofillDialogController* const controller_; |
| 319 | 330 |
| 320 // True if the termination action was a submit. | 331 // True if the termination action was a submit. |
| 321 bool did_submit_; | 332 bool did_submit_; |
| 322 | 333 |
| 323 // The window that displays |contents_|. Weak pointer; may be NULL when the | 334 // The window that displays |contents_|. Weak pointer; may be NULL when the |
| 324 // dialog is closing. | 335 // dialog is closing. |
| 325 ConstrainedWindowViews* window_; | 336 ConstrainedWindowViews* window_; |
| 326 | 337 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 // This checkbox controls whether new details are saved to the Autofill | 374 // This checkbox controls whether new details are saved to the Autofill |
| 364 // database. It lives in |extra_view_|. | 375 // database. It lives in |extra_view_|. |
| 365 views::Checkbox* save_in_chrome_checkbox_; | 376 views::Checkbox* save_in_chrome_checkbox_; |
| 366 | 377 |
| 367 // View to host |autocheckout_progress_bar_| and its label. | 378 // View to host |autocheckout_progress_bar_| and its label. |
| 368 views::View* autocheckout_progress_bar_view_; | 379 views::View* autocheckout_progress_bar_view_; |
| 369 | 380 |
| 370 // Progress bar for displaying Autocheckout progress. | 381 // Progress bar for displaying Autocheckout progress. |
| 371 AutocheckoutProgressBar* autocheckout_progress_bar_; | 382 AutocheckoutProgressBar* autocheckout_progress_bar_; |
| 372 | 383 |
| 384 // View shown when accepting of a new Terms of Service is required. Lives |
| 385 // below the Cancel/Submit buttons. |
| 386 views::View* footnote_view_; |
| 387 |
| 373 // The focus manager for |window_|. | 388 // The focus manager for |window_|. |
| 374 views::FocusManager* focus_manager_; | 389 views::FocusManager* focus_manager_; |
| 375 | 390 |
| 376 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); | 391 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
| 377 }; | 392 }; |
| 378 | 393 |
| 379 } // namespace autofill | 394 } // namespace autofill |
| 380 | 395 |
| 381 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 396 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| OLD | NEW |