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_AUTOFILL_CREDIT_CARD_BUBBLE_H_ | |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_CREDIT_CARD_BUBBLE_H_ | |
7 | |
8 #include "base/memory/weak_ptr.h" | |
9 | |
10 namespace autofill { | |
11 | |
12 class AutofillCreditCardBubbleController; | |
13 | |
14 //////////////////////////////////////////////////////////////////////////////// | |
15 // | |
16 // AutofillCreditCardBubble | |
17 // | |
18 // An interface to be implemented on each platform to show a bubble after the | |
19 // Autofill dialog is sucessfully submitted. Shows anchored to an icon that | |
20 // looks like a credit card or the Google Wallet logo in the omnibox. Hidden | |
21 // when focus is lost. | |
22 // | |
23 //////////////////////////////////////////////////////////////////////////////// | |
24 class AutofillCreditCardBubble { | |
25 public: | |
26 // The preferred size of the bubble's contents. | |
27 static const int kContentWidth; | |
28 | |
29 virtual ~AutofillCreditCardBubble(); | |
30 | |
31 // Visually reveals the dialog bubble. | |
32 virtual void Show() = 0; | |
33 | |
34 // Hides the bubble from view. | |
35 virtual void Hide() = 0; | |
36 | |
37 // Returns whether the bubble is currently in the process of hiding itself. | |
38 virtual bool IsHiding() const = 0; | |
39 | |
40 // Creates a bubble view that's operated by |controller| and owned by the | |
41 // platform's widget or view management framework. |controller| is invalid | |
42 // while the bubble is closing. | |
43 static base::WeakPtr<AutofillCreditCardBubble> Create( | |
44 const base::WeakPtr<AutofillCreditCardBubbleController>& controller); | |
45 }; | |
46 | |
47 } // namespace autofill | |
48 | |
49 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_CREDIT_CARD_BUBBLE_H_ | |
OLD | NEW |