| 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" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // 2. ManageView: Displays the current page's saved credentials. | 23 // 2. ManageView: Displays the current page's saved credentials. |
| 24 // 3. BlacklistedView: Informs the user that the current page is blacklisted. | 24 // 3. BlacklistedView: Informs the user that the current page is blacklisted. |
| 25 // | 25 // |
| 26 class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView { | 26 class ManagePasswordsBubbleView : public LocationBarBubbleDelegateView { |
| 27 public: | 27 public: |
| 28 // Shows the bubble. | 28 // Shows the bubble. |
| 29 static void ShowBubble(content::WebContents* web_contents, | 29 static void ShowBubble(content::WebContents* web_contents, |
| 30 DisplayReason reason); | 30 DisplayReason reason); |
| 31 | 31 |
| 32 // Closes the existing bubble. | 32 // Closes the existing bubble. |
| 33 static void CloseBubble(); | 33 static void CloseCurrentBubble(); |
| 34 | 34 |
| 35 // Makes the bubble the foreground window. | 35 // Makes the bubble the foreground window. |
| 36 static void ActivateBubble(); | 36 static void ActivateBubble(); |
| 37 | 37 |
| 38 // Returns a pointer to the bubble. | 38 // Returns a pointer to the bubble. |
| 39 static ManagePasswordsBubbleView* manage_password_bubble() { | 39 static ManagePasswordsBubbleView* manage_password_bubble() { |
| 40 return manage_passwords_bubble_; | 40 return manage_passwords_bubble_; |
| 41 } | 41 } |
| 42 | 42 |
| 43 content::WebContents* web_contents() const; | 43 content::WebContents* web_contents() const; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 64 class WebContentMouseHandler; | 64 class WebContentMouseHandler; |
| 65 | 65 |
| 66 ManagePasswordsBubbleView(content::WebContents* web_contents, | 66 ManagePasswordsBubbleView(content::WebContents* web_contents, |
| 67 views::View* anchor_view, | 67 views::View* anchor_view, |
| 68 DisplayReason reason); | 68 DisplayReason reason); |
| 69 ~ManagePasswordsBubbleView() override; | 69 ~ManagePasswordsBubbleView() override; |
| 70 | 70 |
| 71 // LocationBarBubbleDelegateView: | 71 // LocationBarBubbleDelegateView: |
| 72 views::View* GetInitiallyFocusedView() override; | 72 views::View* GetInitiallyFocusedView() override; |
| 73 void Init() override; | 73 void Init() override; |
| 74 void Close() override; | 74 void CloseBubble() override; |
| 75 | 75 |
| 76 // WidgetDelegate: | 76 // WidgetDelegate: |
| 77 base::string16 GetWindowTitle() const override; | 77 base::string16 GetWindowTitle() const override; |
| 78 bool ShouldShowWindowTitle() const override; | 78 bool ShouldShowWindowTitle() const override; |
| 79 bool ShouldShowCloseButton() const override; | 79 bool ShouldShowCloseButton() const override; |
| 80 | 80 |
| 81 // Refreshes the bubble's state: called to display a confirmation screen after | 81 // Refreshes the bubble's state: called to display a confirmation screen after |
| 82 // a user selects "Never for this site", for instance. | 82 // a user selects "Never for this site", for instance. |
| 83 void Refresh(); | 83 void Refresh(); |
| 84 | 84 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 100 | 100 |
| 101 views::View* initially_focused_view_; | 101 views::View* initially_focused_view_; |
| 102 | 102 |
| 103 // A helper to intercept mouse click events on the web contents. | 103 // A helper to intercept mouse click events on the web contents. |
| 104 scoped_ptr<WebContentMouseHandler> mouse_handler_; | 104 scoped_ptr<WebContentMouseHandler> mouse_handler_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); | 106 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 #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 |