OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_VIEWS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/timer/timer.h" |
11 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_view.h" | 12 #include "chrome/browser/ui/autofill/generated_credit_card_bubble_view.h" |
12 #include "ui/views/bubble/bubble_delegate.h" | 13 #include "ui/views/bubble/bubble_delegate.h" |
13 #include "ui/views/controls/styled_label_listener.h" | 14 #include "ui/views/controls/styled_label_listener.h" |
14 | 15 |
15 namespace autofill { | 16 namespace autofill { |
16 | 17 |
17 class GeneratedCreditCardBubbleController; | 18 class GeneratedCreditCardBubbleController; |
18 | 19 |
19 // Views toolkit implementation of the GeneratedCreditCardBubbleView (an | 20 // Views toolkit implementation of the GeneratedCreditCardBubbleView (an |
20 // educational bubble shown after a successful generation of a new credit card | 21 // educational bubble shown after a successful generation of a new credit card |
(...skipping 19 matching lines...) Expand all Loading... |
40 OVERRIDE; | 41 OVERRIDE; |
41 | 42 |
42 private: | 43 private: |
43 friend base::WeakPtr<GeneratedCreditCardBubbleView> | 44 friend base::WeakPtr<GeneratedCreditCardBubbleView> |
44 GeneratedCreditCardBubbleView::Create( | 45 GeneratedCreditCardBubbleView::Create( |
45 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller); | 46 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller); |
46 | 47 |
47 explicit GeneratedCreditCardBubbleViews( | 48 explicit GeneratedCreditCardBubbleViews( |
48 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller); | 49 const base::WeakPtr<GeneratedCreditCardBubbleController>& controller); |
49 | 50 |
| 51 // Releases focus capture (which is assumed on Show()). |
| 52 void ReleaseCapture(); |
| 53 |
50 // Controller that drives this bubble. May be invalid when hiding. | 54 // Controller that drives this bubble. May be invalid when hiding. |
51 base::WeakPtr<GeneratedCreditCardBubbleController> controller_; | 55 base::WeakPtr<GeneratedCreditCardBubbleController> controller_; |
52 | 56 |
53 base::WeakPtrFactory<GeneratedCreditCardBubbleView> weak_ptr_factory_; | 57 // A timer used for releasing focus capture. |
| 58 base::Timer capture_timer_; |
| 59 |
| 60 base::WeakPtrFactory<GeneratedCreditCardBubbleViews> weak_ptr_factory_; |
54 | 61 |
55 DISALLOW_COPY_AND_ASSIGN(GeneratedCreditCardBubbleViews); | 62 DISALLOW_COPY_AND_ASSIGN(GeneratedCreditCardBubbleViews); |
56 }; | 63 }; |
57 | 64 |
58 } // namespace autofill | 65 } // namespace autofill |
59 | 66 |
60 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_VIEWS_H
_ | 67 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_GENERATED_CREDIT_CARD_BUBBLE_VIEWS_H
_ |
OLD | NEW |