OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ |
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ |
7 | 7 |
8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 @class AutofillDialogWindowController; | 25 @class AutofillDialogWindowController; |
26 | 26 |
27 namespace autofill { | 27 namespace autofill { |
28 | 28 |
29 class AutofillDialogCocoa : public AutofillDialogView, | 29 class AutofillDialogCocoa : public AutofillDialogView, |
30 public ConstrainedWindowMacDelegate { | 30 public ConstrainedWindowMacDelegate { |
31 public: | 31 public: |
32 explicit AutofillDialogCocoa(AutofillDialogViewDelegate* delegate); | 32 explicit AutofillDialogCocoa(AutofillDialogViewDelegate* delegate); |
33 virtual ~AutofillDialogCocoa(); | 33 ~AutofillDialogCocoa() override; |
34 | 34 |
35 // AutofillDialogView implementation: | 35 // AutofillDialogView implementation: |
36 virtual void Show() override; | 36 void Show() override; |
37 virtual void Hide() override; | 37 void Hide() override; |
38 virtual void UpdatesStarted() override; | 38 void UpdatesStarted() override; |
39 virtual void UpdatesFinished() override; | 39 void UpdatesFinished() override; |
40 virtual void UpdateAccountChooser() override; | 40 void UpdateAccountChooser() override; |
41 virtual void UpdateButtonStrip() override; | 41 void UpdateButtonStrip() override; |
42 virtual void UpdateOverlay() override; | 42 void UpdateOverlay() override; |
43 virtual void UpdateDetailArea() override; | 43 void UpdateDetailArea() override; |
44 virtual void UpdateForErrors() override; | 44 void UpdateForErrors() override; |
45 virtual void UpdateNotificationArea() override; | 45 void UpdateNotificationArea() override; |
46 virtual void UpdateSection(DialogSection section) override; | 46 void UpdateSection(DialogSection section) override; |
47 virtual void UpdateErrorBubble() override; | 47 void UpdateErrorBubble() override; |
48 virtual void FillSection(DialogSection section, | 48 void FillSection(DialogSection section, |
49 ServerFieldType originating_type) override; | 49 ServerFieldType originating_type) override; |
50 virtual void GetUserInput(DialogSection section, | 50 void GetUserInput(DialogSection section, FieldValueMap* output) override; |
51 FieldValueMap* output) override; | 51 base::string16 GetCvc() override; |
52 virtual base::string16 GetCvc() override; | 52 bool SaveDetailsLocally() override; |
53 virtual bool SaveDetailsLocally() override; | 53 const content::NavigationController* ShowSignIn(const GURL& url) override; |
54 virtual const content::NavigationController* ShowSignIn( | 54 void HideSignIn() override; |
55 const GURL& url) override; | 55 void ModelChanged() override; |
56 virtual void HideSignIn() override; | 56 void OnSignInResize(const gfx::Size& pref_size) override; |
57 virtual void ModelChanged() override; | 57 void ValidateSection(DialogSection section) override; |
58 virtual void OnSignInResize(const gfx::Size& pref_size) override; | |
59 virtual void ValidateSection(DialogSection section) override; | |
60 | 58 |
61 // ConstrainedWindowMacDelegate implementation: | 59 // ConstrainedWindowMacDelegate implementation: |
62 virtual void OnConstrainedWindowClosed( | 60 void OnConstrainedWindowClosed(ConstrainedWindowMac* window) override; |
63 ConstrainedWindowMac* window) override; | |
64 | 61 |
65 AutofillDialogViewDelegate* delegate() { return delegate_; } | 62 AutofillDialogViewDelegate* delegate() { return delegate_; } |
66 | 63 |
67 // Posts a close request on the current message loop. | 64 // Posts a close request on the current message loop. |
68 void PerformClose(); | 65 void PerformClose(); |
69 | 66 |
70 private: | 67 private: |
71 friend class AutofillDialogViewTesterCocoa; | 68 friend class AutofillDialogViewTesterCocoa; |
72 | 69 |
73 // Closes the sheet and ends the modal loop. Triggers cleanup sequence. | 70 // Closes the sheet and ends the modal loop. Triggers cleanup sequence. |
74 void CloseNow(); | 71 void CloseNow(); |
75 | 72 |
76 scoped_ptr<ConstrainedWindowMac> constrained_window_; | 73 scoped_ptr<ConstrainedWindowMac> constrained_window_; |
77 base::scoped_nsobject<AutofillDialogWindowController> sheet_delegate_; | 74 base::scoped_nsobject<AutofillDialogWindowController> sheet_delegate_; |
78 | 75 |
79 // The delegate |this| queries for logic and state. | 76 // The delegate |this| queries for logic and state. |
80 AutofillDialogViewDelegate* delegate_; | 77 AutofillDialogViewDelegate* delegate_; |
81 | 78 |
82 // WeakPtrFactory for deferred close. | 79 // WeakPtrFactory for deferred close. |
83 base::WeakPtrFactory<AutofillDialogCocoa> close_weak_ptr_factory_; | 80 base::WeakPtrFactory<AutofillDialogCocoa> close_weak_ptr_factory_; |
84 | 81 |
85 }; | 82 }; |
86 | 83 |
87 } // autofill | 84 } // autofill |
88 | 85 |
89 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ | 86 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ |
OLD | NEW |