| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/autofill/test_autofill_credit_card_bubble.h" | |
| 6 | |
| 7 namespace autofill { | |
| 8 | |
| 9 // static | |
| 10 base::WeakPtr<TestAutofillCreditCardBubble> | |
| 11 TestAutofillCreditCardBubble::Create( | |
| 12 const base::WeakPtr<AutofillCreditCardBubbleController>& controller) { | |
| 13 return (new TestAutofillCreditCardBubble(controller))->GetWeakPtr(); | |
| 14 } | |
| 15 | |
| 16 TestAutofillCreditCardBubble::~TestAutofillCreditCardBubble() {} | |
| 17 | |
| 18 void TestAutofillCreditCardBubble::Show() { | |
| 19 showing_ = true; | |
| 20 } | |
| 21 | |
| 22 void TestAutofillCreditCardBubble::Hide() { | |
| 23 delete this; | |
| 24 } | |
| 25 | |
| 26 bool TestAutofillCreditCardBubble::IsHiding() const { | |
| 27 return !showing_; | |
| 28 } | |
| 29 | |
| 30 base::WeakPtr<TestAutofillCreditCardBubble> | |
| 31 TestAutofillCreditCardBubble::GetWeakPtr() { | |
| 32 return weak_ptr_factory_.GetWeakPtr(); | |
| 33 } | |
| 34 | |
| 35 TestAutofillCreditCardBubble::TestAutofillCreditCardBubble( | |
| 36 const base::WeakPtr<AutofillCreditCardBubbleController>& controller) | |
| 37 : showing_(false), | |
| 38 weak_ptr_factory_(this) {} | |
| 39 | |
| 40 } // namespace autofill | |
| OLD | NEW |