Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / autofill / test_generated_credit_card_bubble_view.cc
blobdd19c630cbb387a4c130749665ca38d95b4e850b
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.
5 #include "chrome/browser/ui/autofill/test_generated_credit_card_bubble_view.h"
7 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_controller.h"
9 namespace autofill {
11 // static
12 base::WeakPtr<TestGeneratedCreditCardBubbleView>
13 TestGeneratedCreditCardBubbleView::Create(
14 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller) {
15 return (new TestGeneratedCreditCardBubbleView(controller))->GetWeakPtr();
18 TestGeneratedCreditCardBubbleView::~TestGeneratedCreditCardBubbleView() {}
20 void TestGeneratedCreditCardBubbleView::Show() {
21 showing_ = true;
24 void TestGeneratedCreditCardBubbleView::Hide() {
25 delete this;
28 bool TestGeneratedCreditCardBubbleView::IsHiding() const {
29 return !showing_;
32 base::WeakPtr<TestGeneratedCreditCardBubbleView>
33 TestGeneratedCreditCardBubbleView::GetWeakPtr() {
34 return weak_ptr_factory_.GetWeakPtr();
37 TestGeneratedCreditCardBubbleView::TestGeneratedCreditCardBubbleView(
38 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller)
39 : controller_(controller),
40 showing_(false),
41 weak_ptr_factory_(this) {}
43 } // namespace autofill