| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // Globals -------------------------------------------------------------------- | 124 // Globals -------------------------------------------------------------------- |
| 125 | 125 |
| 126 namespace chrome { | 126 namespace chrome { |
| 127 | 127 |
| 128 void ShowManagePasswordsBubble(content::WebContents* web_contents) { | 128 void ShowManagePasswordsBubble(content::WebContents* web_contents) { |
| 129 ManagePasswordsUIController* controller = | 129 ManagePasswordsUIController* controller = |
| 130 ManagePasswordsUIController::FromWebContents(web_contents); | 130 ManagePasswordsUIController::FromWebContents(web_contents); |
| 131 ManagePasswordsBubbleView::ShowBubble( | 131 ManagePasswordsBubbleView::ShowBubble( |
| 132 web_contents, | 132 web_contents, |
| 133 controller->state() == | 133 password_manager::ui::IsAutomaticDisplayState(controller->state()) |
| 134 password_manager::ui::PENDING_PASSWORD_AND_BUBBLE_STATE | |
| 135 ? ManagePasswordsBubbleView::AUTOMATIC | 134 ? ManagePasswordsBubbleView::AUTOMATIC |
| 136 : ManagePasswordsBubbleView::USER_ACTION); | 135 : ManagePasswordsBubbleView::USER_ACTION); |
| 137 } | 136 } |
| 138 | 137 |
| 139 } // namespace chrome | 138 } // namespace chrome |
| 140 | 139 |
| 141 | 140 |
| 142 // ManagePasswordsBubbleView::PendingView ------------------------------------- | 141 // ManagePasswordsBubbleView::PendingView ------------------------------------- |
| 143 | 142 |
| 144 ManagePasswordsBubbleView::PendingView::PendingView( | 143 ManagePasswordsBubbleView::PendingView::PendingView( |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 | 563 |
| 565 void ManagePasswordsBubbleView::NotifyConfirmedNeverForThisSite() { | 564 void ManagePasswordsBubbleView::NotifyConfirmedNeverForThisSite() { |
| 566 model()->OnNeverForThisSiteClicked(); | 565 model()->OnNeverForThisSiteClicked(); |
| 567 Close(); | 566 Close(); |
| 568 } | 567 } |
| 569 | 568 |
| 570 void ManagePasswordsBubbleView::NotifyUndoNeverForThisSite() { | 569 void ManagePasswordsBubbleView::NotifyUndoNeverForThisSite() { |
| 571 never_save_passwords_ = false; | 570 never_save_passwords_ = false; |
| 572 Refresh(); | 571 Refresh(); |
| 573 } | 572 } |
| OLD | NEW |