Index: chrome/browser/ui/views/autofill/new_credit_card_bubble_views.h |
diff --git a/chrome/browser/ui/views/autofill/new_credit_card_bubble_views.h b/chrome/browser/ui/views/autofill/new_credit_card_bubble_views.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2b897e95c5382af10c95e3ed7c23a65682eaca66 |
--- /dev/null |
+++ b/chrome/browser/ui/views/autofill/new_credit_card_bubble_views.h |
@@ -0,0 +1,57 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEWS_H_ |
+#define CHROME_BROWSER_UI_VIEWS_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEWS_H_ |
+ |
+#include "base/basictypes.h" |
+#include "base/compiler_specific.h" |
+#include "base/memory/weak_ptr.h" |
+#include "chrome/browser/ui/autofill/new_credit_card_bubble.h" |
+#include "ui/views/bubble/bubble_delegate.h" |
+#include "ui/views/controls/link_listener.h" |
+ |
+namespace autofill { |
+ |
+class NewCreditCardBubbleController; |
+ |
+// Views toolkit implementation of NewCreditCardBubble (a bubble shown after a |
+// user saved a new card locally in Chrome). |
+class NewCreditCardBubbleViews : public NewCreditCardBubble, |
+ public views::BubbleDelegateView, |
+ public views::LinkListener { |
+ public: |
+ virtual ~NewCreditCardBubbleViews(); |
+ |
+ // NewCreditCardBubble: |
+ virtual void Show() OVERRIDE; |
+ virtual void Hide() OVERRIDE; |
+ |
+ // views::BubbleDelegateView: |
+ virtual gfx::Size GetPreferredSize() OVERRIDE; |
+ virtual base::string16 GetWindowTitle() const OVERRIDE; |
+ virtual void Init() OVERRIDE; |
+ |
+ // views::LinkListener: |
+ virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
+ |
+ private: |
+ friend base::WeakPtr<NewCreditCardBubble> |
+ NewCreditCardBubble::Create( |
+ const base::WeakPtr<NewCreditCardBubbleController>& controller); |
+ |
+ explicit NewCreditCardBubbleViews( |
+ const base::WeakPtr<NewCreditCardBubbleController>& controller); |
+ |
+ // Controller that drives this bubble. Invalid when hiding. |
+ base::WeakPtr<NewCreditCardBubbleController> controller_; |
+ |
+ base::WeakPtrFactory<NewCreditCardBubble> weak_ptr_factory_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NewCreditCardBubbleViews); |
+}; |
+ |
+} // namespace autofill |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_VIEWS_H_ |