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