Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: chrome/browser/ui/views/autofill/new_credit_card_bubble_views.h

Issue 21668003: Implement newly saved card bubble for realz and update generated card bubble to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_VIEWS_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEWS_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/autofill/new_credit_card_bubble.h"
12 #include "ui/views/bubble/bubble_delegate.h"
13 #include "ui/views/controls/link_listener.h"
14
15 namespace autofill {
16
17 class NewCreditCardBubbleController;
18
19 // Views toolkit implementation of NewCreditCardBubble (a bubble shown after a
20 // user saved a new card locally in Chrome).
21 class NewCreditCardBubbleViews : public NewCreditCardBubble,
22 public views::BubbleDelegateView,
23 public views::LinkListener {
24 public:
25 virtual ~NewCreditCardBubbleViews();
26
27 // NewCreditCardBubble:
28 virtual void Show() OVERRIDE;
29 virtual void Hide() OVERRIDE;
30
31 // views::BubbleDelegateView:
32 virtual gfx::Size GetPreferredSize() OVERRIDE;
33 virtual base::string16 GetWindowTitle() const OVERRIDE;
34 virtual void Init() OVERRIDE;
35
36 // views::LinkListener:
37 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
38
39 private:
40 friend base::WeakPtr<NewCreditCardBubble>
41 NewCreditCardBubble::Create(
42 const base::WeakPtr<NewCreditCardBubbleController>& controller);
43
44 explicit NewCreditCardBubbleViews(
45 const base::WeakPtr<NewCreditCardBubbleController>& controller);
46
47 // Controller that drives this bubble. Invalid when hiding.
48 base::WeakPtr<NewCreditCardBubbleController> controller_;
49
50 base::WeakPtrFactory<NewCreditCardBubble> weak_ptr_factory_;
51
52 DISALLOW_COPY_AND_ASSIGN(NewCreditCardBubbleViews);
53 };
54
55 } // namespace autofill
56
57 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698