| 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/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.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/exclusive_access/fullscreen_controller.h" | 10 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
| (...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 // static | 854 // static |
| 855 ManagePasswordsBubbleView* ManagePasswordsBubbleView::manage_passwords_bubble_ = | 855 ManagePasswordsBubbleView* ManagePasswordsBubbleView::manage_passwords_bubble_ = |
| 856 NULL; | 856 NULL; |
| 857 | 857 |
| 858 // static | 858 // static |
| 859 void ManagePasswordsBubbleView::ShowBubble(content::WebContents* web_contents, | 859 void ManagePasswordsBubbleView::ShowBubble(content::WebContents* web_contents, |
| 860 DisplayReason reason) { | 860 DisplayReason reason) { |
| 861 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); | 861 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
| 862 DCHECK(browser); | 862 DCHECK(browser); |
| 863 DCHECK(browser->window()); | 863 DCHECK(browser->window()); |
| 864 DCHECK(browser->fullscreen_controller()); | |
| 865 | 864 |
| 866 if (IsShowing()) | 865 if (IsShowing()) |
| 867 return; | 866 return; |
| 868 | 867 |
| 869 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); | 868 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); |
| 870 bool is_fullscreen = browser_view->IsFullscreen(); | 869 bool is_fullscreen = browser_view->IsFullscreen(); |
| 871 ManagePasswordsIconView* anchor_view = | 870 ManagePasswordsIconView* anchor_view = |
| 872 is_fullscreen | 871 is_fullscreen |
| 873 ? NULL | 872 ? NULL |
| 874 : browser_view->GetLocationBarView()->manage_passwords_icon_view(); | 873 : browser_view->GetLocationBarView()->manage_passwords_icon_view(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 | 991 |
| 993 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { | 992 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { |
| 994 if (model()->best_matches().empty()) { | 993 if (model()->best_matches().empty()) { |
| 995 // Skip confirmation if there are no existing passwords for this site. | 994 // Skip confirmation if there are no existing passwords for this site. |
| 996 NotifyConfirmedNeverForThisSite(); | 995 NotifyConfirmedNeverForThisSite(); |
| 997 } else { | 996 } else { |
| 998 model()->OnConfirmationForNeverForThisSite(); | 997 model()->OnConfirmationForNeverForThisSite(); |
| 999 Refresh(); | 998 Refresh(); |
| 1000 } | 999 } |
| 1001 } | 1000 } |
| OLD | NEW |