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 "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual void Show() OVERRIDE; | 71 virtual void Show() OVERRIDE; |
72 virtual void Hide() OVERRIDE; | 72 virtual void Hide() OVERRIDE; |
73 virtual void UpdateAccountChooser() OVERRIDE; | 73 virtual void UpdateAccountChooser() OVERRIDE; |
74 virtual void UpdateButtonStrip() OVERRIDE; | 74 virtual void UpdateButtonStrip() OVERRIDE; |
75 virtual void UpdateNotificationArea() OVERRIDE; | 75 virtual void UpdateNotificationArea() OVERRIDE; |
76 virtual void UpdateSection(DialogSection section) OVERRIDE; | 76 virtual void UpdateSection(DialogSection section) OVERRIDE; |
77 virtual void GetUserInput(DialogSection section, | 77 virtual void GetUserInput(DialogSection section, |
78 DetailOutputMap* output) OVERRIDE; | 78 DetailOutputMap* output) OVERRIDE; |
79 virtual string16 GetCvc() OVERRIDE; | 79 virtual string16 GetCvc() OVERRIDE; |
80 virtual bool UseBillingForShipping() OVERRIDE; | 80 virtual bool UseBillingForShipping() OVERRIDE; |
81 virtual bool SaveDetailsInWallet() OVERRIDE; | |
82 virtual bool SaveDetailsLocally() OVERRIDE; | 81 virtual bool SaveDetailsLocally() OVERRIDE; |
83 virtual const content::NavigationController* ShowSignIn() OVERRIDE; | 82 virtual const content::NavigationController* ShowSignIn() OVERRIDE; |
84 virtual void HideSignIn() OVERRIDE; | 83 virtual void HideSignIn() OVERRIDE; |
85 virtual void UpdateProgressBar(double value) OVERRIDE; | 84 virtual void UpdateProgressBar(double value) OVERRIDE; |
86 virtual void ModelChanged() OVERRIDE; | 85 virtual void ModelChanged() OVERRIDE; |
87 virtual void SubmitForTesting() OVERRIDE; | 86 virtual void SubmitForTesting() OVERRIDE; |
88 virtual void CancelForTesting() OVERRIDE; | 87 virtual void CancelForTesting() OVERRIDE; |
89 | 88 |
90 // views::DialogDelegate implementation: | 89 // views::DialogDelegate implementation: |
91 virtual string16 GetWindowTitle() const OVERRIDE; | 90 virtual string16 GetWindowTitle() const OVERRIDE; |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 virtual ~NotificationArea(); | 212 virtual ~NotificationArea(); |
214 | 213 |
215 void set_arrow_centering_anchor( | 214 void set_arrow_centering_anchor( |
216 const base::WeakPtr<views::View>& arrow_centering_anchor) { | 215 const base::WeakPtr<views::View>& arrow_centering_anchor) { |
217 arrow_centering_anchor_ = arrow_centering_anchor; | 216 arrow_centering_anchor_ = arrow_centering_anchor; |
218 } | 217 } |
219 | 218 |
220 // Displays the given notifications. | 219 // Displays the given notifications. |
221 void SetNotifications(const std::vector<DialogNotification>& notifications); | 220 void SetNotifications(const std::vector<DialogNotification>& notifications); |
222 | 221 |
223 // Returns true if the checkbox exists and is checked. Currently, the | |
224 // notification area only supports showing a checkbox on the topmost | |
225 // notification. | |
226 bool CheckboxIsChecked() const; | |
227 | |
228 // views::View implementation. | 222 // views::View implementation. |
229 virtual std::string GetClassName() const OVERRIDE; | 223 virtual std::string GetClassName() const OVERRIDE; |
230 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 224 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
231 | 225 |
| 226 views::Checkbox* checkbox() { return checkbox_; } |
| 227 |
232 private: | 228 private: |
233 // Utility function for determining whether an arrow should be drawn | 229 // Utility function for determining whether an arrow should be drawn |
234 // pointing at |arrow_centering_anchor_|. | 230 // pointing at |arrow_centering_anchor_|. |
235 bool HasArrow(); | 231 bool HasArrow(); |
236 | 232 |
237 // The currently showing checkbox, or NULL if none exists. | 233 // The currently showing checkbox, or NULL if none exists. |
238 views::Checkbox* checkbox_; // weak | 234 views::Checkbox* checkbox_; // weak |
239 | 235 |
240 // If HasArrow() is true, the arrow should point at this. | 236 // If HasArrow() is true, the arrow should point at this. |
241 base::WeakPtr<views::View> arrow_centering_anchor_; | 237 base::WeakPtr<views::View> arrow_centering_anchor_; |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 | 483 |
488 // The focus manager for |window_|. | 484 // The focus manager for |window_|. |
489 views::FocusManager* focus_manager_; | 485 views::FocusManager* focus_manager_; |
490 | 486 |
491 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); | 487 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
492 }; | 488 }; |
493 | 489 |
494 } // namespace autofill | 490 } // namespace autofill |
495 | 491 |
496 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 492 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
OLD | NEW |