Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 836933005: Refactor fullscreen_controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase change Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 // static 836 // static
837 ManagePasswordsBubbleView* ManagePasswordsBubbleView::manage_passwords_bubble_ = 837 ManagePasswordsBubbleView* ManagePasswordsBubbleView::manage_passwords_bubble_ =
838 NULL; 838 NULL;
839 839
840 // static 840 // static
841 void ManagePasswordsBubbleView::ShowBubble(content::WebContents* web_contents, 841 void ManagePasswordsBubbleView::ShowBubble(content::WebContents* web_contents,
842 DisplayReason reason) { 842 DisplayReason reason) {
843 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); 843 Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
844 DCHECK(browser); 844 DCHECK(browser);
845 DCHECK(browser->window()); 845 DCHECK(browser->window());
846 DCHECK(browser->fullscreen_controller());
847 846
848 if (IsShowing()) 847 if (IsShowing())
849 return; 848 return;
850 849
851 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); 850 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser);
852 bool is_fullscreen = browser_view->IsFullscreen(); 851 bool is_fullscreen = browser_view->IsFullscreen();
853 ManagePasswordsIconView* anchor_view = 852 ManagePasswordsIconView* anchor_view =
854 is_fullscreen 853 is_fullscreen
855 ? NULL 854 ? NULL
856 : browser_view->GetLocationBarView()->manage_passwords_icon_view(); 855 : browser_view->GetLocationBarView()->manage_passwords_icon_view();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 973
975 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { 974 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() {
976 if (model()->best_matches().empty()) { 975 if (model()->best_matches().empty()) {
977 // Skip confirmation if there are no existing passwords for this site. 976 // Skip confirmation if there are no existing passwords for this site.
978 NotifyConfirmedNeverForThisSite(); 977 NotifyConfirmedNeverForThisSite();
979 } else { 978 } else {
980 model()->OnConfirmationForNeverForThisSite(); 979 model()->OnConfirmationForNeverForThisSite();
981 Refresh(); 980 Refresh();
982 } 981 }
983 } 982 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698