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 #ifndef CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_H_ |
| 7 |
| 8 #include "base/memory/weak_ptr.h" |
| 9 |
| 10 namespace autofill { |
| 11 |
| 12 class GeneratedCreditCardBubbleController; |
| 13 |
| 14 //////////////////////////////////////////////////////////////////////////////// |
| 15 // |
| 16 // GeneratedCreditCardBubble |
| 17 // |
| 18 // A cross-platform interface for a bubble shown to educate users after a |
| 19 // credit card number is generated. Anchored to an omnibox icon and shown |
| 20 // either on creation or when the anchor is clicked. Hidden when focus is lost. |
| 21 // |
| 22 //////////////////////////////////////////////////////////////////////////////// |
| 23 class GeneratedCreditCardBubble { |
| 24 public: |
| 25 // The width of the bubble's contents. |
| 26 static const int kContentWidth; |
| 27 |
| 28 virtual ~GeneratedCreditCardBubble(); |
| 29 |
| 30 // Visually reveal the dialog bubble. |
| 31 virtual void Show() = 0; |
| 32 |
| 33 // Hide the bubble from view. |
| 34 virtual void Hide() = 0; |
| 35 |
| 36 // Whether the bubble is currently in the process of hiding itself. |
| 37 virtual bool IsHiding() const = 0; |
| 38 |
| 39 // Create a bubble view that's operated by |controller| and owns itself. |
| 40 // |controller| may be invalid while the bubble is closing. |
| 41 static base::WeakPtr<GeneratedCreditCardBubble> Create( |
| 42 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller); |
| 43 }; |
| 44 |
| 45 } // namespace autofill |
| 46 |
| 47 #endif // CHROME_BROWSER_UI_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_H_ |
OLD | NEW |