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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble.h" |
10 #include "chrome/browser/ui/views/passwords/save_password_refusal_combobox_model
.h" | 10 #include "chrome/browser/ui/views/passwords/save_password_refusal_combobox_model
.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 DisplayReason reason); | 115 DisplayReason reason); |
116 | 116 |
117 // Closes any existing bubble. | 117 // Closes any existing bubble. |
118 static void CloseBubble(); | 118 static void CloseBubble(); |
119 | 119 |
120 // Whether the bubble is currently showing. | 120 // Whether the bubble is currently showing. |
121 static bool IsShowing(); | 121 static bool IsShowing(); |
122 | 122 |
123 private: | 123 private: |
124 ManagePasswordsBubbleView(content::WebContents* web_contents, | 124 ManagePasswordsBubbleView(content::WebContents* web_contents, |
125 views::View* anchor_view, | 125 ManagePasswordsIconView* anchor_view, |
126 DisplayReason reason); | 126 DisplayReason reason); |
127 virtual ~ManagePasswordsBubbleView(); | 127 virtual ~ManagePasswordsBubbleView(); |
128 | 128 |
129 // If the bubble is not anchored to a view, places the bubble in the top | 129 // If the bubble is not anchored to a view, places the bubble in the top |
130 // right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s | 130 // right (left in RTL) of the |screen_bounds| that contain |web_contents_|'s |
131 // browser window. Because the positioning is based on the size of the | 131 // browser window. Because the positioning is based on the size of the |
132 // bubble, this must be called after the bubble is created. | 132 // bubble, this must be called after the bubble is created. |
133 void AdjustForFullscreen(const gfx::Rect& screen_bounds); | 133 void AdjustForFullscreen(const gfx::Rect& screen_bounds); |
134 | 134 |
135 // Close the bubble. | 135 // Close the bubble. |
136 void Close(); | 136 void Close(); |
137 | 137 |
138 // views::BubbleDelegateView: | 138 // views::BubbleDelegateView: |
139 virtual void Init() OVERRIDE; | 139 virtual void Init() OVERRIDE; |
140 virtual void WindowClosing() OVERRIDE; | 140 virtual void WindowClosing() OVERRIDE; |
141 | 141 |
142 // Singleton instance of the Password bubble. The Password bubble can only be | 142 // Singleton instance of the Password bubble. The Password bubble can only be |
143 // shown on the active browser window, so there is no case in which it will be | 143 // shown on the active browser window, so there is no case in which it will be |
144 // shown twice at the same time. | 144 // shown twice at the same time. |
145 static ManagePasswordsBubbleView* manage_passwords_bubble_; | 145 static ManagePasswordsBubbleView* manage_passwords_bubble_; |
146 | 146 |
| 147 ManagePasswordsIconView* anchor_view_; |
| 148 |
147 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); | 149 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); |
148 }; | 150 }; |
149 | 151 |
150 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 152 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
OLD | NEW |