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_NEW_CREDIT_CARD_BUBBLE_VIEW_H_
6#define CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEW_H_
7
8#include "base/memory/weak_ptr.h"
9
10namespace autofill {
11
12class NewCreditCardBubbleController;
13
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.
17class NewCreditCardBubbleView {
18 public:
19  // The preferred width of the bubble's contents.
20  static const int kContentsWidth;
21
22  virtual ~NewCreditCardBubbleView();
23
24  // Visually reveals the bubble.
25  virtual void Show() = 0;
26
27  // Hides the bubble from view.
28  virtual void Hide() = 0;
29
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);
34};
35
36}  // namespace autofill
37
38#endif  // CHROME_BROWSER_UI_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEW_H_
39