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_COCOA_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_COCOA_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_COCOA_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/autofill/new_credit_card_bubble_view.h"
15 @
class InfoBubbleWindow
;
16 @
class NewCreditCardBubbleControllerCocoa
;
19 class InfoBubbleWindow
;
20 class NewCreditCardBubbleControllerCocoa
;
27 class NewCreditCardBubbleController
;
29 // Cocoa implementation of NewCreditCardBubbleView (a bubble shown after a user
30 // saved a new credit card locally in Chrome).
31 class NewCreditCardBubbleCocoa
: public NewCreditCardBubbleView
{
33 ~NewCreditCardBubbleCocoa() override
;
35 // NewCreditCardBubbleView implementation.
40 FRIEND_TEST_ALL_PREFIXES(NewCreditCardBubbleCocoaUnitTest
, CloseDeletes
);
41 friend base::WeakPtr
<NewCreditCardBubbleView
> NewCreditCardBubbleView::Create(
42 NewCreditCardBubbleController
* controller
);
44 explicit NewCreditCardBubbleCocoa(NewCreditCardBubbleController
*);
46 // Creates the cocoa bubble controller without initializing anything else.
47 void CreateCocoaController(NSWindow
* parent
);
49 InfoBubbleWindow
* GetInfoBubbleWindow();
51 // Cocoa-side controller for the bubble. Not owned.
52 NewCreditCardBubbleControllerCocoa
* bubbleController_
;
54 // Controller that drives this bubble. Never NULL; outlives this class.
55 NewCreditCardBubbleController
* controller_
;
57 base::WeakPtrFactory
<NewCreditCardBubbleCocoa
> weak_ptr_factory_
;
59 DISALLOW_COPY_AND_ASSIGN(NewCreditCardBubbleCocoa
);
62 } // namespace auotfill
64 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_NEW_CREDIT_CARD_BUBBLE_COCOA_H_