Index: chrome/browser/ui/autofill/generated_credit_card_bubble.h |
diff --git a/chrome/browser/ui/autofill/generated_credit_card_bubble.h b/chrome/browser/ui/autofill/generated_credit_card_bubble.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1b94e41d7757648f6605387be6c027dc4c7114f2 |
--- /dev/null |
+++ b/chrome/browser/ui/autofill/generated_credit_card_bubble.h |
@@ -0,0 +1,47 @@ |
+// 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_GENERATED_CREDIT_CARD_BUBBLE_H_ |
+#define CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_H_ |
+ |
+#include "base/memory/weak_ptr.h" |
+ |
+namespace autofill { |
+ |
+class GeneratedCreditCardBubbleController; |
+ |
+//////////////////////////////////////////////////////////////////////////////// |
+// |
+// GeneratedCreditCardBubble |
+// |
+// A cross-platform interface for a bubble shown to educate users after a |
+// credit card number is generated. Anchored to an omnibox icon and shown |
+// either on creation or when the anchor is clicked. Hidden when focus is lost. |
+// |
+//////////////////////////////////////////////////////////////////////////////// |
+class GeneratedCreditCardBubble { |
+ public: |
+ // The width of the bubble's contents. |
+ static const int kContentWidth; |
+ |
+ virtual ~GeneratedCreditCardBubble(); |
+ |
+ // Visually reveal the dialog bubble. |
+ virtual void Show() = 0; |
+ |
+ // Hide the bubble from view. |
+ virtual void Hide() = 0; |
+ |
+ // Whether the bubble is currently in the process of hiding itself. |
+ virtual bool IsHiding() const = 0; |
+ |
+ // Create a bubble view that's operated by |controller| and owns itself. |
+ // |controller| may be invalid while the bubble is closing. |
+ static base::WeakPtr<GeneratedCreditCardBubble> Create( |
+ const base::WeakPtr<GeneratedCreditCardBubbleController>& controller); |
+}; |
+ |
+} // namespace autofill |
+ |
+#endif // CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_H_ |