| 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 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 manage_passwords_bubble_->GetWidget()->Show(); | 553 manage_passwords_bubble_->GetWidget()->Show(); |
| 554 } | 554 } |
| 555 | 555 |
| 556 // static | 556 // static |
| 557 void ManagePasswordsBubbleView::CloseBubble() { | 557 void ManagePasswordsBubbleView::CloseBubble() { |
| 558 if (manage_passwords_bubble_) | 558 if (manage_passwords_bubble_) |
| 559 manage_passwords_bubble_->Close(); | 559 manage_passwords_bubble_->Close(); |
| 560 } | 560 } |
| 561 | 561 |
| 562 // static | 562 // static |
| 563 void ManagePasswordsBubbleView::ActivateBubble() { |
| 564 if (!IsShowing()) |
| 565 return; |
| 566 manage_passwords_bubble_->GetWidget()->Activate(); |
| 567 } |
| 568 |
| 569 // static |
| 563 bool ManagePasswordsBubbleView::IsShowing() { | 570 bool ManagePasswordsBubbleView::IsShowing() { |
| 564 // The bubble may be in the process of closing. | 571 // The bubble may be in the process of closing. |
| 565 return (manage_passwords_bubble_ != NULL) && | 572 return (manage_passwords_bubble_ != NULL) && |
| 566 manage_passwords_bubble_->GetWidget()->IsVisible(); | 573 manage_passwords_bubble_->GetWidget()->IsVisible(); |
| 567 } | 574 } |
| 568 | 575 |
| 569 ManagePasswordsBubbleView::ManagePasswordsBubbleView( | 576 ManagePasswordsBubbleView::ManagePasswordsBubbleView( |
| 570 content::WebContents* web_contents, | 577 content::WebContents* web_contents, |
| 571 ManagePasswordsIconView* anchor_view, | 578 ManagePasswordsIconView* anchor_view, |
| 572 DisplayReason reason) | 579 DisplayReason reason) |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 | 661 |
| 655 void ManagePasswordsBubbleView::NotifyConfirmedNeverForThisSite() { | 662 void ManagePasswordsBubbleView::NotifyConfirmedNeverForThisSite() { |
| 656 model()->OnNeverForThisSiteClicked(); | 663 model()->OnNeverForThisSiteClicked(); |
| 657 Close(); | 664 Close(); |
| 658 } | 665 } |
| 659 | 666 |
| 660 void ManagePasswordsBubbleView::NotifyUndoNeverForThisSite() { | 667 void ManagePasswordsBubbleView::NotifyUndoNeverForThisSite() { |
| 661 never_save_passwords_ = false; | 668 never_save_passwords_ = false; |
| 662 Refresh(); | 669 Refresh(); |
| 663 } | 670 } |
| OLD | NEW |