Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2835)

Unified Diff: chrome/browser/ui/autofill/test_generated_credit_card_bubble.h

Issue 21668003: Implement newly saved card bubble for realz and update generated card bubble to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/autofill/test_generated_credit_card_bubble.h
diff --git a/chrome/browser/ui/autofill/test_generated_credit_card_bubble.h b/chrome/browser/ui/autofill/test_generated_credit_card_bubble.h
new file mode 100644
index 0000000000000000000000000000000000000000..ae7d092b055cb2c3283b8808c26e5f4f9b08cd93
--- /dev/null
+++ b/chrome/browser/ui/autofill/test_generated_credit_card_bubble.h
@@ -0,0 +1,57 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_AUTOFILL_TEST_GENERATED_CREDIT_CARD_BUBBLE_H_
+#define CHROME_BROWSER_UI_AUTOFILL_TEST_GENERATED_CREDIT_CARD_BUBBLE_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/ui/autofill/generated_credit_card_bubble.h"
+
+namespace autofill {
+
+////////////////////////////////////////////////////////////////////////////////
+//
+// TestGeneratedCreditCardBubble
+//
+// A cross-platform, headless bubble that doesn't conflict with other top-level
+// widgets/windows.
+//
+////////////////////////////////////////////////////////////////////////////////
+class TestGeneratedCreditCardBubble : public GeneratedCreditCardBubble {
+ public:
+ // Creates a bubble and returns a weak reference to it.
+ static base::WeakPtr<TestGeneratedCreditCardBubble> Create(
+ const base::WeakPtr<GeneratedCreditCardBubbleController>& controller);
+
+ virtual ~TestGeneratedCreditCardBubble();
+
+ // GeneratedCreditCardBubble:
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual bool IsHiding() const OVERRIDE;
+
+ base::WeakPtr<TestGeneratedCreditCardBubble> GetWeakPtr();
+
+ bool showing() const { return showing_; }
+
+ private:
+ explicit TestGeneratedCreditCardBubble(
+ const base::WeakPtr<GeneratedCreditCardBubbleController>& controller);
+
+ // A weak reference to the controller that operates this bubble.
+ base::WeakPtr<GeneratedCreditCardBubbleController> controller_;
+
+ // Whether the bubble is currently showing or not.
+ bool showing_;
+
+ base::WeakPtrFactory<TestGeneratedCreditCardBubble> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestGeneratedCreditCardBubble);
+};
+
+} // namespace autofill
+
+#endif // CHROME_BROWSER_UI_AUTOFILL_TEST_GENERATED_CREDIT_CARD_BUBBLE_H_

Powered by Google App Engine
This is Rietveld 408576698