autofill_dialog_views.h revision 7dbb3d5cf0c15f500944d211057644d6a2f37371
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 <map> 9 10#include "base/memory/weak_ptr.h" 11#include "base/scoped_observer.h" 12#include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 13#include "chrome/browser/ui/autofill/autofill_dialog_view.h" 14#include "chrome/browser/ui/autofill/testable_autofill_dialog_view.h" 15#include "ui/base/animation/animation_delegate.h" 16#include "ui/views/controls/button/button.h" 17#include "ui/views/controls/button/menu_button_listener.h" 18#include "ui/views/controls/combobox/combobox_listener.h" 19#include "ui/views/controls/link_listener.h" 20#include "ui/views/controls/progress_bar.h" 21#include "ui/views/controls/scroll_view.h" 22#include "ui/views/controls/styled_label_listener.h" 23#include "ui/views/controls/textfield/textfield.h" 24#include "ui/views/controls/textfield/textfield_controller.h" 25#include "ui/views/focus/focus_manager.h" 26#include "ui/views/widget/widget_observer.h" 27#include "ui/views/window/dialog_delegate.h" 28 29namespace content { 30class KeyboardListener; 31} 32 33namespace gfx { 34class Image; 35} 36 37namespace views { 38class Checkbox; 39class Combobox; 40class FocusableBorder; 41class FocusManager; 42class ImageButton; 43class ImageView; 44class Label; 45class LabelButton; 46class Link; 47class MenuRunner; 48class StyledLabel; 49class WebView; 50class Widget; 51} // namespace views 52 53namespace ui { 54class ComboboxModel; 55class KeyEvent; 56class MultiAnimation; 57} 58 59namespace autofill { 60 61class AutofillDialogSignInDelegate; 62struct DetailInput; 63 64// Views toolkit implementation of the Autofill dialog that handles the 65// imperative autocomplete API call. 66class AutofillDialogViews : public AutofillDialogView, 67 public TestableAutofillDialogView, 68 public views::DialogDelegateView, 69 public views::WidgetObserver, 70 public views::ButtonListener, 71 public views::TextfieldController, 72 public views::FocusChangeListener, 73 public views::ComboboxListener, 74 public views::StyledLabelListener { 75 public: 76 explicit AutofillDialogViews(AutofillDialogController* controller); 77 virtual ~AutofillDialogViews(); 78 79 // AutofillDialogView implementation: 80 virtual void Show() OVERRIDE; 81 virtual void Hide() OVERRIDE; 82 virtual void UpdateAccountChooser() OVERRIDE; 83 virtual void UpdateAutocheckoutStepsArea() OVERRIDE; 84 virtual void UpdateButtonStrip() OVERRIDE; 85 virtual void UpdateDetailArea() OVERRIDE; 86 virtual void UpdateForErrors() OVERRIDE; 87 virtual void UpdateNotificationArea() OVERRIDE; 88 virtual void UpdateSection(DialogSection section) OVERRIDE; 89 virtual void FillSection(DialogSection section, 90 const DetailInput& originating_input) OVERRIDE; 91 virtual void GetUserInput(DialogSection section, 92 DetailOutputMap* output) OVERRIDE; 93 virtual string16 GetCvc() OVERRIDE; 94 virtual bool SaveDetailsLocally() OVERRIDE; 95 virtual const content::NavigationController* ShowSignIn() OVERRIDE; 96 virtual void HideSignIn() OVERRIDE; 97 virtual void UpdateProgressBar(double value) OVERRIDE; 98 virtual void ModelChanged() OVERRIDE; 99 virtual TestableAutofillDialogView* GetTestableView() OVERRIDE; 100 virtual void OnSignInResize(const gfx::Size& pref_size) OVERRIDE; 101 102 // TestableAutofillDialogView implementation: 103 virtual void SubmitForTesting() OVERRIDE; 104 virtual void CancelForTesting() OVERRIDE; 105 virtual string16 GetTextContentsOfInput(const DetailInput& input) OVERRIDE; 106 virtual void SetTextContentsOfInput(const DetailInput& input, 107 const string16& contents) OVERRIDE; 108 virtual void SetTextContentsOfSuggestionInput( 109 DialogSection section, 110 const base::string16& text) OVERRIDE; 111 virtual void ActivateInput(const DetailInput& input) OVERRIDE; 112 virtual gfx::Size GetSize() const OVERRIDE; 113 114 // views::View implementation. 115 virtual gfx::Size GetPreferredSize() OVERRIDE; 116 virtual void Layout() OVERRIDE; 117 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; 118 119 // views::DialogDelegate implementation: 120 virtual string16 GetWindowTitle() const OVERRIDE; 121 virtual void WindowClosing() OVERRIDE; 122 virtual void DeleteDelegate() OVERRIDE; 123 virtual views::View* CreateOverlayView() OVERRIDE; 124 virtual int GetDialogButtons() const OVERRIDE; 125 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; 126 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; 127 virtual views::View* CreateExtraView() OVERRIDE; 128 virtual views::View* CreateTitlebarExtraView() OVERRIDE; 129 virtual views::View* CreateFootnoteView() OVERRIDE; 130 virtual bool Cancel() OVERRIDE; 131 virtual bool Accept() OVERRIDE; 132 virtual views::NonClientFrameView* CreateNonClientFrameView( 133 views::Widget* widget) OVERRIDE; 134 135 // views::WidgetObserver implementation: 136 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; 137 virtual void OnWidgetBoundsChanged(views::Widget* widget, 138 const gfx::Rect& new_bounds) OVERRIDE; 139 140 // views::ButtonListener implementation: 141 virtual void ButtonPressed(views::Button* sender, 142 const ui::Event& event) OVERRIDE; 143 144 // views::TextfieldController implementation: 145 virtual void ContentsChanged(views::Textfield* sender, 146 const string16& new_contents) OVERRIDE; 147 virtual bool HandleKeyEvent(views::Textfield* sender, 148 const ui::KeyEvent& key_event) OVERRIDE; 149 virtual bool HandleMouseEvent(views::Textfield* sender, 150 const ui::MouseEvent& key_event) OVERRIDE; 151 152 // views::FocusChangeListener implementation. 153 virtual void OnWillChangeFocus(views::View* focused_before, 154 views::View* focused_now) OVERRIDE; 155 virtual void OnDidChangeFocus(views::View* focused_before, 156 views::View* focused_now) OVERRIDE; 157 158 // views::ComboboxListener implementation: 159 virtual void OnSelectedIndexChanged(views::Combobox* combobox) OVERRIDE; 160 161 // views::StyledLabelListener implementation: 162 virtual void StyledLabelLinkClicked(const ui::Range& range, int event_flags) 163 OVERRIDE; 164 165 private: 166 // A class that creates and manages a widget for error messages. 167 class ErrorBubble : public views::WidgetObserver { 168 public: 169 ErrorBubble(views::View* anchor, const string16& message); 170 virtual ~ErrorBubble(); 171 172 bool IsShowing(); 173 174 // Re-positions the bubble over |anchor_|. If |anchor_| is not visible, 175 // the bubble will hide. 176 void UpdatePosition(); 177 178 virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE; 179 180 views::View* anchor() { return anchor_; } 181 182 private: 183 // Calculates and returns the bounds of |widget_|, depending on |anchor_| 184 // and |contents_|. 185 gfx::Rect GetBoundsForWidget(); 186 187 views::Widget* widget_; // Weak, may be NULL. 188 views::View* anchor_; // Weak. 189 // The contents view of |widget_|. 190 views::View* contents_; // Weak. 191 ScopedObserver<views::Widget, ErrorBubble> observer_; 192 193 DISALLOW_COPY_AND_ASSIGN(ErrorBubble); 194 }; 195 196 // A class which holds a textfield and draws extra stuff on top, like 197 // invalid content indications. 198 class DecoratedTextfield : public views::Textfield { 199 public: 200 DecoratedTextfield(const string16& default_value, 201 const string16& placeholder, 202 views::TextfieldController* controller); 203 virtual ~DecoratedTextfield(); 204 205 // Sets whether to indicate the textfield has invalid content. 206 void SetInvalid(bool invalid); 207 bool invalid() const { return invalid_; } 208 209 // Sets the icon to be displayed inside the textfield at the end of the 210 // text. 211 void SetIcon(const gfx::Image& icon); 212 213 // views::View implementation. 214 virtual const char* GetClassName() const OVERRIDE; 215 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; 216 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 217 218 private: 219 // We draw the border. 220 views::FocusableBorder* border_; // Weak. 221 222 // The icon that goes at the right side of the textfield. 223 gfx::Image icon_; 224 225 // Whether the text contents are "invalid" (i.e. should special markers be 226 // shown to indicate invalidness). 227 bool invalid_; 228 229 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield); 230 }; 231 232 // A View which displays the currently selected account and lets the user 233 // switch accounts. 234 class AccountChooser : public views::View, 235 public views::LinkListener, 236 public base::SupportsWeakPtr<AccountChooser> { 237 public: 238 explicit AccountChooser(AutofillDialogController* controller); 239 virtual ~AccountChooser(); 240 241 // Updates the view based on the state that |controller_| reports. 242 void Update(); 243 244 // views::View implementation. 245 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 246 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; 247 248 // views::LinkListener implementation. 249 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; 250 251 private: 252 // The icon for the currently in-use account. 253 views::ImageView* image_; 254 255 // The label for the currently in-use account. 256 views::Label* label_; 257 258 // The drop arrow. 259 views::ImageView* arrow_; 260 261 // The sign in link. 262 views::Link* link_; 263 264 // The controller |this| queries for logic and state. 265 AutofillDialogController* controller_; 266 267 // Runs the suggestion menu (triggered by each section's |suggested_button|. 268 scoped_ptr<views::MenuRunner> menu_runner_; 269 270 DISALLOW_COPY_AND_ASSIGN(AccountChooser); 271 }; 272 273 // A view which displays an image, optionally some messages and a button. Used 274 // for the splash page as well as the Wallet interstitial. 275 class OverlayView : public views::View, 276 public ui::AnimationDelegate { 277 public: 278 // The listener is informed when |button_| is pressed. 279 explicit OverlayView(views::ButtonListener* listener); 280 virtual ~OverlayView(); 281 282 // Sets properties that should be displayed. 283 void SetState(const DialogOverlayState& state, 284 views::ButtonListener* listener); 285 286 // Fades the view out after a delay. 287 void BeginFadeOut(); 288 289 // ui::AnimationDelegate implementation: 290 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; 291 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; 292 293 // views::View implementation: 294 virtual void Layout() OVERRIDE; 295 virtual const char* GetClassName() const OVERRIDE; 296 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 297 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; 298 299 private: 300 // Child View. Front and center. 301 views::ImageView* image_view_; 302 // Child View. When visible, below |image_view_|. 303 views::View* message_stack_; 304 // Child View. When visible, below |message_stack_|. 305 views::LabelButton* button_; 306 307 // This MultiAnimation is used to first fade out the contents of the 308 // overlay, then fade out the background of the overlay (revealing the 309 // dialog behind the overlay). This avoids cross-fade. 310 scoped_ptr<ui::MultiAnimation> fade_out_; 311 312 DISALLOW_COPY_AND_ASSIGN(OverlayView); 313 }; 314 315 // An area for notifications. Some notifications point at the account chooser. 316 class NotificationArea : public views::View, 317 public views::ButtonListener { 318 public: 319 explicit NotificationArea(AutofillDialogController* controller); 320 virtual ~NotificationArea(); 321 322 // Displays the given notifications. 323 void SetNotifications(const std::vector<DialogNotification>& notifications); 324 325 // views::View implementation. 326 virtual gfx::Size GetPreferredSize() OVERRIDE; 327 virtual const char* GetClassName() const OVERRIDE; 328 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; 329 330 // views::ButtonListener implementation: 331 virtual void ButtonPressed(views::Button* sender, 332 const ui::Event& event) OVERRIDE; 333 334 void set_arrow_centering_anchor( 335 const base::WeakPtr<views::View>& arrow_centering_anchor) { 336 arrow_centering_anchor_ = arrow_centering_anchor; 337 } 338 339 private: 340 // Utility function for determining whether an arrow should be drawn 341 // pointing at |arrow_centering_anchor_|. 342 bool HasArrow(); 343 344 // A reference to the controller than owns this view. Used to report when 345 // checkboxes change their values. 346 AutofillDialogController* controller_; // weak 347 348 // The currently showing checkbox, or NULL if none exists. 349 views::Checkbox* checkbox_; // weak 350 351 // If HasArrow() is true, the arrow should point at this. 352 base::WeakPtr<views::View> arrow_centering_anchor_; 353 354 std::vector<DialogNotification> notifications_; 355 356 DISALLOW_COPY_AND_ASSIGN(NotificationArea); 357 }; 358 359 typedef std::map<const DetailInput*, DecoratedTextfield*> TextfieldMap; 360 typedef std::map<const DetailInput*, views::Combobox*> ComboboxMap; 361 362 // A view that packs a label on the left and some related controls 363 // on the right. 364 class SectionContainer : public views::View { 365 public: 366 SectionContainer(const string16& label, 367 views::View* controls, 368 views::Button* proxy_button); 369 virtual ~SectionContainer(); 370 371 // Sets the visual appearance of the section to active (considered active 372 // when showing the menu or hovered by the mouse cursor). 373 void SetActive(bool active); 374 375 // Sets whether mouse events should be forwarded to |proxy_button_|. 376 void SetForwardMouseEvents(bool forward); 377 378 // views::View implementation. 379 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; 380 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; 381 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 382 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 383 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; 384 385 private: 386 // Converts |event| to one suitable for |proxy_button_|. 387 static ui::MouseEvent ProxyEvent(const ui::MouseEvent& event); 388 389 // Mouse events on |this| are sent to this button. 390 views::Button* proxy_button_; // Weak reference. 391 392 // When true, mouse events will be forwarded to |proxy_button_|. 393 bool forward_mouse_events_; 394 395 DISALLOW_COPY_AND_ASSIGN(SectionContainer); 396 }; 397 398 // A view that contains a suggestion (such as a known address) and a link to 399 // edit the suggestion. 400 class SuggestionView : public views::View { 401 public: 402 SuggestionView(const string16& edit_label, 403 AutofillDialogViews* autofill_dialog); 404 virtual ~SuggestionView(); 405 406 // Sets the display text of the suggestion. 407 void SetSuggestionText(const string16& text, gfx::Font::FontStyle style); 408 409 // Sets the icon which should be displayed ahead of the text. 410 void SetSuggestionIcon(const gfx::Image& image); 411 412 // Shows an auxiliary textfield to the right of the suggestion icon and 413 // text. This is currently only used to show a CVC field for the CC section. 414 void ShowTextfield(const string16& placeholder_text, 415 const gfx::Image& icon); 416 417 DecoratedTextfield* decorated_textfield() { return decorated_; } 418 419 private: 420 // The label that holds the suggestion description text. 421 views::Label* label_; 422 // The second (and greater) line of text that describes the suggestion. 423 views::Label* label_line_2_; 424 // The icon that comes just before |label_|. 425 views::ImageView* icon_; 426 // A view to contain |label_| and |icon_|. 427 views::View* label_container_; 428 // The input set by ShowTextfield. 429 DecoratedTextfield* decorated_; 430 // An "Edit" link that flips to editable inputs rather than suggestion text. 431 views::Link* edit_link_; 432 433 DISALLOW_COPY_AND_ASSIGN(SuggestionView); 434 }; 435 436 // A convenience struct for holding pointers to views within each detail 437 // section. None of the member pointers are owned. 438 struct DetailsGroup { 439 explicit DetailsGroup(DialogSection section); 440 ~DetailsGroup(); 441 442 // The section this group is associated with. 443 const DialogSection section; 444 // The view that contains the entire section (label + input). 445 SectionContainer* container; 446 // The view that allows manual input. 447 views::View* manual_input; 448 // The textfields in |manual_input|, tracked by their DetailInput. 449 TextfieldMap textfields; 450 // The comboboxes in |manual_input|, tracked by their DetailInput. 451 ComboboxMap comboboxes; 452 // The view that holds the text of the suggested data. This will be 453 // visible IFF |manual_input| is not visible. 454 SuggestionView* suggested_info; 455 // The view that allows selecting other data suggestions. 456 views::ImageButton* suggested_button; 457 }; 458 459 // Area for displaying that status of various steps in an Autocheckout flow. 460 class AutocheckoutStepsArea : public views::View { 461 public: 462 AutocheckoutStepsArea(); 463 virtual ~AutocheckoutStepsArea() {} 464 465 // Display the given steps. 466 void SetSteps(const std::vector<DialogAutocheckoutStep>& steps); 467 468 private: 469 DISALLOW_COPY_AND_ASSIGN(AutocheckoutStepsArea); 470 }; 471 472 class AutocheckoutProgressBar : public views::ProgressBar { 473 public: 474 AutocheckoutProgressBar(); 475 virtual ~AutocheckoutProgressBar(); 476 477 private: 478 // Overriden from View 479 virtual gfx::Size GetPreferredSize() OVERRIDE; 480 481 DISALLOW_COPY_AND_ASSIGN(AutocheckoutProgressBar); 482 }; 483 484 typedef std::map<DialogSection, DetailsGroup> DetailGroupMap; 485 486 void InitChildViews(); 487 488 // Creates and returns a view that holds all detail sections. 489 views::View* CreateDetailsContainer(); 490 491 // Creates and returns a view that holds the requesting host and intro text. 492 views::View* CreateNotificationArea(); 493 494 // Creates and returns a view that holds the main controls of this dialog. 495 views::View* CreateMainContainer(); 496 497 // Creates a detail section (Shipping, Email, etc.) with the given label, 498 // inputs View, and suggestion model. Relevant pointers are stored in |group|. 499 void CreateDetailsSection(DialogSection section); 500 501 // Like CreateDetailsSection, but creates the combined billing/cc section, 502 // which is somewhat more complicated than the others. 503 void CreateBillingSection(); 504 505 // Creates the view that holds controls for inputing or selecting data for 506 // a given section. 507 views::View* CreateInputsContainer(DialogSection section); 508 509 // Creates a grid of textfield views for the given section, and stores them 510 // in the appropriate DetailsGroup. The top level View in the hierarchy is 511 // returned. 512 views::View* InitInputsView(DialogSection section); 513 514 // Updates the given section to match the state provided by |controller_|. If 515 // |clobber_inputs| is true, the current state of the textfields will be 516 // ignored, otherwise their contents will be preserved. 517 void UpdateSectionImpl(DialogSection section, bool clobber_inputs); 518 519 // Updates the visual state of the given group as per the model. 520 void UpdateDetailsGroupState(const DetailsGroup& group); 521 522 // Gets a pointer to the DetailsGroup that's associated with the given section 523 // of the dialog. 524 DetailsGroup* GroupForSection(DialogSection section); 525 526 // Gets a pointer to the DetailsGroup that's associated with a given |view|. 527 // Returns NULL if no DetailsGroup was found. 528 DetailsGroup* GroupForView(views::View* view); 529 530 // Sets the visual state for an input to be either valid or invalid. This 531 // should work on Comboboxes or DecoratedTextfields. If |message| is empty, 532 // the input is valid. 533 template<class T> 534 void SetValidityForInput(T* input, const string16& message); 535 536 // Shows an error bubble pointing at |view| if |view| has a message in 537 // |validity_map_|. 538 void ShowErrorBubbleForViewIfNecessary(views::View* view); 539 540 // Updates validity of the inputs in |section| with the new validity data. 541 void MarkInputsInvalid(DialogSection section, 542 const ValidityData& validity_data); 543 544 // Checks all manual inputs in |group| for validity. Decorates the invalid 545 // ones and returns true if all were valid. 546 bool ValidateGroup(const DetailsGroup& group, ValidationType type); 547 548 // Checks all manual inputs in the form for validity. Decorates the invalid 549 // ones and returns true if all were valid. 550 bool ValidateForm(); 551 552 // When an input textfield is edited (its contents change) or activated 553 // (clicked while focused), this function will inform the controller that it's 554 // time to show a suggestion popup and possibly reset the validity state of 555 // the input. 556 void TextfieldEditedOrActivated(views::Textfield* textfield, bool was_edit); 557 558 // Updates the [X] Save in Chrome checkbox in the button strip. 559 void UpdateSaveInChromeCheckbox(); 560 561 // Call this when the size of anything in |contents_| might've changed. 562 void ContentsPreferredSizeChanged(); 563 564 // Gets the textfield view that is shown for the given DetailInput model, or 565 // NULL. 566 views::Textfield* TextfieldForInput(const DetailInput& input); 567 568 // Gets the combobox view that is shown for the given DetailInput model, or 569 // NULL. 570 views::Combobox* ComboboxForInput(const DetailInput& input); 571 572 // Called when the details container changes in size or position. 573 void DetailsContainerBoundsChanged(); 574 575 // The controller that drives this view. Weak pointer, always non-NULL. 576 AutofillDialogController* const controller_; 577 578 // The window that displays |contents_|. Weak pointer; may be NULL when the 579 // dialog is closing. 580 views::Widget* window_; 581 582 // A DialogSection-keyed map of the DetailGroup structs. 583 DetailGroupMap detail_groups_; 584 585 // Somewhere to show notification messages about errors, warnings, or promos. 586 NotificationArea* notification_area_; 587 588 // Runs the suggestion menu (triggered by each section's |suggested_button|. 589 scoped_ptr<views::MenuRunner> menu_runner_; 590 591 // The view that allows the user to toggle the data source. 592 AccountChooser* account_chooser_; 593 594 // A WebView to that navigates to a Google sign-in page to allow the user to 595 // sign-in. 596 views::WebView* sign_in_webview_; 597 598 // View that wraps |details_container_| and makes it scroll vertically. 599 views::ScrollView* scrollable_area_; 600 601 // View to host details sections. 602 views::View* details_container_; 603 604 // A view that overlays |this| (for "loading..." messages). 605 views::Label* loading_shield_; 606 607 // The view that completely overlays the dialog (used for the splash page). 608 OverlayView* overlay_view_; 609 610 // The "Extra view" is on the same row as the dialog buttons. 611 views::View* button_strip_extra_view_; 612 613 // This checkbox controls whether new details are saved to the Autofill 614 // database. It lives in |extra_view_|. 615 views::Checkbox* save_in_chrome_checkbox_; 616 617 // View to host Autocheckout steps. 618 AutocheckoutStepsArea* autocheckout_steps_area_; 619 620 // View to host |autocheckout_progress_bar_| and its label. 621 views::View* autocheckout_progress_bar_view_; 622 623 // Progress bar for displaying Autocheckout progress. 624 AutocheckoutProgressBar* autocheckout_progress_bar_; 625 626 // The view that is appended to the bottom of the dialog, below the button 627 // strip. Used to display legal document links. 628 views::View* footnote_view_; 629 630 // The legal document text and links. 631 views::StyledLabel* legal_document_view_; 632 633 // The focus manager for |window_|. 634 views::FocusManager* focus_manager_; 635 636 // The object that manages the error bubble widget. 637 scoped_ptr<ErrorBubble> error_bubble_; 638 639 // Map from input view (textfield or combobox) to error string. 640 std::map<views::View*, string16> validity_map_; 641 642 ScopedObserver<views::Widget, AutofillDialogViews> observer_; 643 644 // Delegate for the sign-in dialog's webview. 645 scoped_ptr<AutofillDialogSignInDelegate> sign_in_delegate_; 646 647 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); 648}; 649 650} // namespace autofill 651 652#endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 653