OLD | NEW |
---|---|
(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_COCOA_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_COCOA_H_ | |
6 #define CHROME_BROWSER_UI_COCOA_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_COCOA_H_ | |
7 | |
8 #include "base/mac/scoped_nsobject.h" | |
9 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_view.h" | |
10 | |
11 #ifdef __OBJC__ | |
12 @class GeneratedCreditCardBubbleControllerCocoa; | |
13 #else | |
14 class GeneratedCreditCardBubbleControllerCocoa; | |
15 } | |
Scott Hess - ex-Googler
2013/10/31 20:23:19
} seems wrong.
groby-ooo-7-16
2013/10/31 22:55:47
Blatantly wrong indeed - fixed.
| |
16 #endif | |
17 | |
18 namespace autofill { | |
19 | |
20 class GeneratedCreditCardBubbleCocoa : public GeneratedCreditCardBubbleView { | |
21 public: | |
22 virtual ~GeneratedCreditCardBubbleCocoa(); | |
23 | |
24 // GeneratedCreditCardBubbleView interface. | |
25 virtual void Show() OVERRIDE; | |
26 virtual void Hide() OVERRIDE; | |
27 virtual bool IsHiding() const OVERRIDE; | |
28 | |
29 private: | |
30 explicit GeneratedCreditCardBubbleCocoa( | |
31 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller); | |
32 friend base::WeakPtr<GeneratedCreditCardBubbleView> | |
33 GeneratedCreditCardBubbleView::Create( | |
34 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller); | |
35 | |
36 // Cocoa-side controller for the bubble. Not owned. | |
37 GeneratedCreditCardBubbleControllerCocoa* bubbleController_; | |
38 | |
39 // Controller that drives this bubble. May be invalid when hiding. | |
40 base::WeakPtr<GeneratedCreditCardBubbleController> controller_; | |
41 | |
42 // Factory to vend WeakPtr's to |this|. | |
43 base::WeakPtrFactory<GeneratedCreditCardBubbleCocoa> weak_ptr_factory_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(GeneratedCreditCardBubbleCocoa); | |
46 }; | |
47 | |
48 } // namespace autofill | |
49 | |
50 #endif // CHROME_BROWSER_UI_COCOA_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_COCOA_H _ | |
51 | |
OLD | NEW |