Chromium Code Reviews| 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 "ui/views/bubble/bubble_delegate.h" | 9 #include "ui/views/bubble/bubble_delegate.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 class ManagePasswordsBubbleView : public ManagePasswordsBubble, | 25 class ManagePasswordsBubbleView : public ManagePasswordsBubble, |
| 26 public views::BubbleDelegateView { | 26 public views::BubbleDelegateView { |
| 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 CloseBubble(); |
| 34 | 34 |
| 35 // Closes the bubble if it's current tab isn't active. | |
| 36 static void CloseBubbleForInactiveTab(); | |
|
Mike West
2014/09/12 11:03:50
Nit: How about 'CloseBubbleIfTabIsInactive()'.
vasilii
2014/09/12 12:29:58
Done.
| |
| 37 | |
| 35 // Makes the bubble the foreground window. | 38 // Makes the bubble the foreground window. |
| 36 static void ActivateBubble(); | 39 static void ActivateBubble(); |
| 37 | 40 |
| 38 // Whether the bubble is currently showing. | 41 // Whether the bubble is currently showing. |
| 39 static bool IsShowing(); | 42 static bool IsShowing(); |
| 40 | 43 |
| 41 // Returns a pointer to the bubble. | 44 // Returns a pointer to the bubble. |
| 42 static const ManagePasswordsBubbleView* manage_password_bubble() { | 45 static const ManagePasswordsBubbleView* manage_password_bubble() { |
| 43 return manage_passwords_bubble_; | 46 return manage_passwords_bubble_; |
| 44 } | 47 } |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 scoped_ptr<WebContentMouseHandler> mouse_handler_; | 136 scoped_ptr<WebContentMouseHandler> mouse_handler_; |
| 134 | 137 |
| 135 // A helper to get a notification when the bubble fades out completely. | 138 // A helper to get a notification when the bubble fades out completely. |
| 136 class FadeOutObserver; | 139 class FadeOutObserver; |
| 137 scoped_ptr<FadeOutObserver> fadeout_observer_; | 140 scoped_ptr<FadeOutObserver> fadeout_observer_; |
| 138 | 141 |
| 139 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); | 142 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsBubbleView); |
| 140 }; | 143 }; |
| 141 | 144 |
| 142 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ | 145 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORDS_BUBBLE_VIEW_H_ |
| OLD | NEW |