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_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" | 8 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
9 #include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h" | 9 #include "chrome/browser/ui/views/managed_full_screen_bubble_delegate_view.h" |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Whether the bubble is currently showing. | 38 // Whether the bubble is currently showing. |
39 static bool IsShowing(); | 39 static bool IsShowing(); |
40 | 40 |
41 // Returns a pointer to the bubble. | 41 // Returns a pointer to the bubble. |
42 static const ManagePasswordsBubbleView* manage_password_bubble() { | 42 static const ManagePasswordsBubbleView* manage_password_bubble() { |
43 return manage_passwords_bubble_; | 43 return manage_passwords_bubble_; |
44 } | 44 } |
45 | 45 |
46 content::WebContents* web_contents() const; | 46 content::WebContents* web_contents() const; |
47 | 47 |
| 48 #if defined(UNIT_TEST) |
48 const View* initially_focused_view() const { | 49 const View* initially_focused_view() const { |
49 return initially_focused_view_; | 50 return initially_focused_view_; |
50 } | 51 } |
51 | 52 |
| 53 static void set_auto_signin_toast_timeout(int seconds) { |
| 54 auto_signin_toast_timeout_ = seconds; |
| 55 } |
| 56 #endif |
| 57 |
52 private: | 58 private: |
53 class AccountChooserView; | 59 class AccountChooserView; |
54 class AutoSigninView; | 60 class AutoSigninView; |
55 class BlacklistedView; | 61 class BlacklistedView; |
56 class ConfirmNeverView; | 62 class ConfirmNeverView; |
57 class ManageView; | 63 class ManageView; |
58 class ManageAccountsView; | 64 class ManageAccountsView; |
59 class PendingView; | 65 class PendingView; |
60 class SaveConfirmationView; | 66 class SaveConfirmationView; |
61 class WebContentMouseHandler; | 67 class WebContentMouseHandler; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 DCHECK(!initially_focused_view_); | 99 DCHECK(!initially_focused_view_); |
94 initially_focused_view_ = view; | 100 initially_focused_view_ = view; |
95 } | 101 } |
96 | 102 |
97 // Singleton instance of the Password bubble. The Password bubble can only be | 103 // Singleton instance of the Password bubble. The Password bubble can only be |
98 // shown on the active browser window, so there is no case in which it will be | 104 // shown on the active browser window, so there is no case in which it will be |
99 // shown twice at the same time. The instance is owned by the Bubble and will | 105 // shown twice at the same time. The instance is owned by the Bubble and will |
100 // be deleted when the bubble closes. | 106 // be deleted when the bubble closes. |
101 static ManagePasswordsBubbleView* manage_passwords_bubble_; | 107 static ManagePasswordsBubbleView* manage_passwords_bubble_; |
102 | 108 |
| 109 // The timeout in seconds for the auto sign-in toast. |
| 110 static int auto_signin_toast_timeout_; |
| 111 |
103 ManagePasswordsIconView* anchor_view_; | 112 ManagePasswordsIconView* anchor_view_; |
104 | 113 |
105 views::View* initially_focused_view_; | 114 views::View* initially_focused_view_; |
106 | 115 |
107 // A helper to intercept mouse click events on the web contents. | 116 // A helper to intercept mouse click events on the web contents. |
108 scoped_ptr<WebContentMouseHandler> mouse_handler_; | 117 scoped_ptr<WebContentMouseHandler> mouse_handler_; |
109 | 118 |
110 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); | 119 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); |
111 }; | 120 }; |
112 | 121 |
113 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 122 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
OLD | NEW |