| 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 #import "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h" | 4 #import "chrome/browser/ui/cocoa/autofill/autofill_dialog_cocoa.h" |
| 5 | 5 |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 9 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 void MockCallback(const FormStructure*, const std::string&) {} | 24 void MockCallback(const FormStructure*, const std::string&) {} |
| 25 | 25 |
| 26 class TestAutofillDialogController : public AutofillDialogControllerImpl { | 26 class TestAutofillDialogController : public AutofillDialogControllerImpl { |
| 27 public: | 27 public: |
| 28 TestAutofillDialogController( | 28 TestAutofillDialogController( |
| 29 content::WebContents* contents, | 29 content::WebContents* contents, |
| 30 const FormData& form_structure, | 30 const FormData& form_structure, |
| 31 const AutofillMetrics& metric_logger, | 31 const AutofillMetrics& metric_logger, |
| 32 scoped_refptr<content::MessageLoopRunner> runner, | 32 scoped_refptr<content::MessageLoopRunner> runner) |
| 33 const DialogType dialog_type) | |
| 34 : AutofillDialogControllerImpl(contents, | 33 : AutofillDialogControllerImpl(contents, |
| 35 form_structure, | 34 form_structure, |
| 36 GURL(), | 35 GURL(), |
| 37 dialog_type, | |
| 38 base::Bind(MockCallback)), | 36 base::Bind(MockCallback)), |
| 39 metric_logger_(metric_logger) , | 37 metric_logger_(metric_logger) , |
| 40 runner_(runner) { | 38 runner_(runner) { |
| 41 DisableWallet(wallet::WalletClient::UNKNOWN_ERROR); | 39 DisableWallet(wallet::WalletClient::UNKNOWN_ERROR); |
| 42 } | 40 } |
| 43 | 41 |
| 44 virtual ~TestAutofillDialogController() {} | 42 virtual ~TestAutofillDialogController() {} |
| 45 | 43 |
| 46 virtual void ViewClosed() OVERRIDE { | 44 virtual void ViewClosed() OVERRIDE { |
| 47 DCHECK(runner_.get()); | 45 DCHECK(runner_.get()); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 controller()->Show(); | 109 controller()->Show(); |
| 112 controller()->OnCancel(); | 110 controller()->OnCancel(); |
| 113 controller()->Hide(); | 111 controller()->Hide(); |
| 114 | 112 |
| 115 RunMessageLoop(); | 113 RunMessageLoop(); |
| 116 } | 114 } |
| 117 | 115 |
| 118 } // namespace | 116 } // namespace |
| 119 | 117 |
| 120 } // namespace autofill | 118 } // namespace autofill |
| OLD | NEW |