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