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

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: Fix build break 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/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
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->GetExclusiveAccessManager()->GetFullscreenController());
miu 2015/01/16 22:17:39 This DCHECK can be removed since there can never b
Sriram 2015/01/21 01:38:57 Done.
843 843
844 if (IsShowing()) 844 if (IsShowing())
845 return; 845 return;
846 846
847 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); 847 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser);
848 bool is_fullscreen = browser_view->IsFullscreen(); 848 bool is_fullscreen = browser_view->IsFullscreen();
849 ManagePasswordsIconView* anchor_view = 849 ManagePasswordsIconView* anchor_view =
850 is_fullscreen 850 is_fullscreen
851 ? NULL 851 ? NULL
852 : browser_view->GetLocationBarView()->manage_passwords_icon_view(); 852 : browser_view->GetLocationBarView()->manage_passwords_icon_view();
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 970
971 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() { 971 void ManagePasswordsBubbleView::NotifyNeverForThisSiteClicked() {
972 if (model()->best_matches().empty()) { 972 if (model()->best_matches().empty()) {
973 // Skip confirmation if there are no existing passwords for this site. 973 // Skip confirmation if there are no existing passwords for this site.
974 NotifyConfirmedNeverForThisSite(); 974 NotifyConfirmedNeverForThisSite();
975 } else { 975 } else {
976 model()->OnConfirmationForNeverForThisSite(); 976 model()->OnConfirmationForNeverForThisSite();
977 Refresh(); 977 Refresh();
978 } 978 }
979 } 979 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698