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/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
10 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" | 11 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" |
11 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" | 12 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" |
12 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" | 13 #include "chrome/browser/ui/cocoa/constrained_window/constrained_window_mac.h" |
13 #include "ui/gfx/geometry/size.h" | 14 #include "ui/gfx/geometry/size.h" |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 class NavigationController; | 17 class NavigationController; |
17 } | 18 } |
18 | 19 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 58 |
58 // Posts a close request on the current message loop. | 59 // Posts a close request on the current message loop. |
59 void PerformClose(); | 60 void PerformClose(); |
60 | 61 |
61 private: | 62 private: |
62 friend class AutofillDialogViewTesterCocoa; | 63 friend class AutofillDialogViewTesterCocoa; |
63 | 64 |
64 // Closes the sheet and ends the modal loop. Triggers cleanup sequence. | 65 // Closes the sheet and ends the modal loop. Triggers cleanup sequence. |
65 void CloseNow(); | 66 void CloseNow(); |
66 | 67 |
67 std::unique_ptr<ConstrainedWindowMac> constrained_window_; | 68 scoped_ptr<ConstrainedWindowMac> constrained_window_; |
68 base::scoped_nsobject<AutofillDialogWindowController> sheet_delegate_; | 69 base::scoped_nsobject<AutofillDialogWindowController> sheet_delegate_; |
69 | 70 |
70 // The delegate |this| queries for logic and state. | 71 // The delegate |this| queries for logic and state. |
71 AutofillDialogViewDelegate* delegate_; | 72 AutofillDialogViewDelegate* delegate_; |
72 | 73 |
73 // WeakPtrFactory for deferred close. | 74 // WeakPtrFactory for deferred close. |
74 base::WeakPtrFactory<AutofillDialogCocoa> close_weak_ptr_factory_; | 75 base::WeakPtrFactory<AutofillDialogCocoa> close_weak_ptr_factory_; |
75 | 76 |
76 }; | 77 }; |
77 | 78 |
78 } // autofill | 79 } // autofill |
79 | 80 |
80 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ | 81 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_AUTOFILL_DIALOG_COCOA_H_ |
OLD | NEW |