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

Unified Diff: chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.h

Issue 40483003: [rAC, OSX] Add "generated CC" info bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove bad DCHECK Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.h
diff --git a/chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.h b/chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.h
new file mode 100644
index 0000000000000000000000000000000000000000..c6c76859baccc20983191c1fbd18865124aa6578
--- /dev/null
+++ b/chrome/browser/ui/cocoa/autofill/generated_credit_card_bubble_cocoa.h
@@ -0,0 +1,58 @@
+// 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_COCOA_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_COCOA_H_
+#define CHROME_BROWSER_UI_COCOA_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_COCOA_H_
+
+#include "base/mac/scoped_nsobject.h"
+#include "chrome/browser/ui/autofill/generated_credit_card_bubble_view.h"
+
+#ifdef __OBJC__
+@class GeneratedCreditCardBubbleControllerCocoa;
+#else
+class GeneratedCreditCardBubbleControllerCocoa;
+#endif
+
+namespace autofill {
+
+class GeneratedCreditCardBubbleCocoa : public GeneratedCreditCardBubbleView {
+ public:
+ virtual ~GeneratedCreditCardBubbleCocoa();
+
+ // GeneratedCreditCardBubbleView interface.
+ virtual void Show() OVERRIDE;
+ virtual void Hide() OVERRIDE;
+ virtual bool IsHiding() const OVERRIDE;
+
+ // Callbacks.
+ void OnBubbleClosing();
+ void OnLinkClicked();
+
+ base::WeakPtr<GeneratedCreditCardBubbleController> controller() {
+ return controller_;
+ }
+
+ private:
+ explicit GeneratedCreditCardBubbleCocoa(
+ const base::WeakPtr<GeneratedCreditCardBubbleController>& controller);
+ friend base::WeakPtr<GeneratedCreditCardBubbleView>
+ GeneratedCreditCardBubbleView::Create(
+ const base::WeakPtr<GeneratedCreditCardBubbleController>& controller);
+
+ // Cocoa-side controller for the bubble. Not owned.
+ GeneratedCreditCardBubbleControllerCocoa* bubbleController_;
+
+ // Controller that drives this bubble. May be invalid when hiding.
+ base::WeakPtr<GeneratedCreditCardBubbleController> controller_;
+
+ // Factory to vend WeakPtr's to |this|.
+ base::WeakPtrFactory<GeneratedCreditCardBubbleCocoa> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(GeneratedCreditCardBubbleCocoa);
+};
+
+} // namespace autofill
+
+#endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_COCOA_H_
+

Powered by Google App Engine
This is Rietveld 408576698