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/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
10 #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view .h" | 10 #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view .h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 class WebContents; | 13 class WebContents; |
14 } | 14 } |
15 | 15 |
16 // The ManagePasswordsBubbleView controls the contents of the bubble which | 16 // The ManagePasswordsBubbleView controls the contents of the bubble which |
17 // pops up when Chrome offers to save a user's password, or when the user | 17 // pops up when Chrome offers to save a user's password, or when the user |
18 // interacts with the Omnibox icon. It has two distinct states: | 18 // interacts with the Omnibox icon. It has two distinct states: |
19 // | 19 // |
20 // 1. PendingView: Offers the user the possibility of saving credentials. | 20 // 1. PendingView: Offers the user the possibility of saving credentials. |
21 // 2. ManageView: Displays the current page's saved credentials. | 21 // 2. ManageView: Displays the current page's saved credentials. |
22 // 3. BlacklistedView: Informs the user that the current page is blacklisted. | 22 // 3. BlacklistedView: Informs the user that the current page is blacklisted. |
23 // | 23 // |
24 class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView { | 24 class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView { |
25 public: | 25 public: |
26 static const int kDesiredBubbleWidth = 370; | |
sky
2017/01/04 20:52:37
constexpr
mrefaat
2017/01/05 00:03:08
Done.
| |
27 | |
26 // Shows the bubble. | 28 // Shows the bubble. |
27 static void ShowBubble(content::WebContents* web_contents, | 29 static void ShowBubble(content::WebContents* web_contents, |
28 DisplayReason reason); | 30 DisplayReason reason); |
29 | 31 |
30 // Closes the existing bubble. | 32 // Closes the existing bubble. |
31 static void CloseCurrentBubble(); | 33 static void CloseCurrentBubble(); |
32 | 34 |
33 // Makes the bubble the foreground window. | 35 // Makes the bubble the foreground window. |
34 static void ActivateBubble(); | 36 static void ActivateBubble(); |
35 | 37 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 ManagePasswordsBubbleModel model_; | 100 ManagePasswordsBubbleModel model_; |
99 | 101 |
100 views::View* initially_focused_view_; | 102 views::View* initially_focused_view_; |
101 | 103 |
102 std::unique_ptr<WebContentMouseHandler> mouse_handler_; | 104 std::unique_ptr<WebContentMouseHandler> mouse_handler_; |
103 | 105 |
104 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); | 106 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); |
105 }; | 107 }; |
106 | 108 |
107 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 109 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
OLD | NEW |