| 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/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/browser_finder.h" | 8 #include "chrome/browser/ui/browser_finder.h" |
| 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" | 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" |
| 10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 // static | 832 // static |
| 833 ManagePasswordsBubbleView* ManagePasswordsBubbleView::manage_passwords_bubble_ = | 833 ManagePasswordsBubbleView* ManagePasswordsBubbleView::manage_passwords_bubble_ = |
| 834 NULL; | 834 NULL; |
| 835 | 835 |
| 836 // static | 836 // static |
| 837 void ManagePasswordsBubbleView::ShowBubble(content::WebContents* web_contents, | 837 void ManagePasswordsBubbleView::ShowBubble(content::WebContents* web_contents, |
| 838 DisplayReason reason) { | 838 DisplayReason reason) { |
| 839 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); | 839 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); |
| 840 DCHECK(browser); | 840 DCHECK(browser); |
| 841 DCHECK(browser->window()); | 841 DCHECK(browser->window()); |
| 842 DCHECK(browser->fullscreen_controller()); | 842 DCHECK(browser->GetExclusiveAccessControllerManager() |
| 843 ->GetFullscreenController()); |
| 843 | 844 |
| 844 if (IsShowing()) | 845 if (IsShowing()) |
| 845 return; | 846 return; |
| 846 | 847 |
| 847 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); | 848 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); |
| 848 bool is_fullscreen = browser_view->IsFullscreen(); | 849 bool is_fullscreen = browser_view->IsFullscreen(); |
| 849 ManagePasswordsIconView* anchor_view = | 850 ManagePasswordsIconView* anchor_view = |
| 850 is_fullscreen | 851 is_fullscreen |
| 851 ? NULL | 852 ? NULL |
| 852 : browser_view->GetLocationBarView()->manage_passwords_icon_view(); | 853 : browser_view->GetLocationBarView()->manage_passwords_icon_view(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 | 971 |
| 971 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { | 972 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { |
| 972 if (model()->best_matches().empty()) { | 973 if (model()->best_matches().empty()) { |
| 973 // Skip confirmation if there are no existing passwords for this site. | 974 // Skip confirmation if there are no existing passwords for this site. |
| 974 NotifyConfirmedNeverForThisSite(); | 975 NotifyConfirmedNeverForThisSite(); |
| 975 } else { | 976 } else { |
| 976 model()->OnConfirmationForNeverForThisSite(); | 977 model()->OnConfirmationForNeverForThisSite(); |
| 977 Refresh(); | 978 Refresh(); |
| 978 } | 979 } |
| 979 } | 980 } |
| OLD | NEW |