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

Side by Side Diff: chrome/browser/ui/views/location_bar/page_info_helper.cc

Issue 1440303002: Componentize SecurityStateModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android/cros fixes Created 5 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/location_bar/page_info_helper.h" 5 #include "chrome/browser/ui/views/location_bar/page_info_helper.h"
6 6
7 #include "chrome/browser/search/search.h" 7 #include "chrome/browser/search/search.h"
8 #include "chrome/browser/ssl/chrome_security_state_model_delegate.h"
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
9 #include "components/omnibox/browser/omnibox_view.h" 10 #include "components/omnibox/browser/omnibox_view.h"
10 #include "content/public/browser/navigation_controller.h" 11 #include "content/public/browser/navigation_controller.h"
11 #include "content/public/browser/navigation_entry.h" 12 #include "content/public/browser/navigation_entry.h"
12 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
13 #include "ui/views/view.h" 14 #include "ui/views/view.h"
14 15
15 using content::NavigationController; 16 using content::NavigationController;
16 using content::NavigationEntry; 17 using content::NavigationEntry;
17 using content::WebContents; 18 using content::WebContents;
(...skipping 11 matching lines...) Expand all
29 WebContents* tab = location_bar_->GetWebContents(); 30 WebContents* tab = location_bar_->GetWebContents();
30 if (!tab) 31 if (!tab)
31 return; 32 return;
32 33
33 // Important to use GetVisibleEntry to match what's showing in the omnibox. 34 // Important to use GetVisibleEntry to match what's showing in the omnibox.
34 NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry(); 35 NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry();
35 // The visible entry can be NULL in the case of window.open(""). 36 // The visible entry can be NULL in the case of window.open("").
36 if (!nav_entry) 37 if (!nav_entry)
37 return; 38 return;
38 39
39 SecurityStateModel* security_model = SecurityStateModel::FromWebContents(tab); 40 ChromeSecurityStateModelDelegate* security_model_delegate =
40 DCHECK(security_model); 41 ChromeSecurityStateModelDelegate::FromWebContents(tab);
42 DCHECK(security_model_delegate);
41 43
42 location_bar_->delegate()->ShowWebsiteSettings( 44 location_bar_->delegate()->ShowWebsiteSettings(
43 tab, nav_entry->GetURL(), security_model->GetSecurityInfo()); 45 tab, nav_entry->GetURL(), security_model_delegate->GetSecurityInfo());
44 } 46 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/web_app_left_header_view_ash.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698