Add ability to gather metrics to BubbleManager.
[chromium-blink-merge.git] / chrome / browser / ui / autofill / new_credit_card_bubble_view.h
blobe6ef8f82e1c18abdda88374d3398a49cd196f36b
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 #ifndef CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEW_H_
8 #include "base/memory/weak_ptr.h"
10 namespace autofill {
12 class NewCreditCardBubbleController;
14 // A cross-platform interface for a bubble that is shown when a new credit card
15 // is saved. Points at the settings menu in the toolbar and hides when
16 // activation is lost.
17 class NewCreditCardBubbleView {
18 public:
19 // The preferred width of the bubble's contents.
20 static const int kContentsWidth;
22 virtual ~NewCreditCardBubbleView();
24 // Visually reveals the bubble.
25 virtual void Show() = 0;
27 // Hides the bubble from view.
28 virtual void Hide() = 0;
30 // Creates a bubble that's operated by |controller| and owns itself.
31 // |controller| may be invalid while the bubble is closing.
32 static base::WeakPtr<NewCreditCardBubbleView> Create(
33 NewCreditCardBubbleController* controller);
36 } // namespace autofill
38 #endif // CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEW_H_