OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame/web_app_left_header_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/web_app_left_header_view_ash.h" |
6 | 6 |
7 #include "ash/frame/caption_buttons/frame_caption_button.h" | 7 #include "ash/frame/caption_buttons/frame_caption_button.h" |
8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" | 8 #include "ash/frame/caption_buttons/frame_caption_button_container_view.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/ssl/chrome_security_state_model_delegate.h" |
10 #include "chrome/browser/ui/browser_commands.h" | 11 #include "chrome/browser/ui/browser_commands.h" |
11 #include "chrome/browser/ui/views/frame/browser_view.h" | 12 #include "chrome/browser/ui/views/frame/browser_view.h" |
12 #include "components/toolbar/toolbar_model.h" | 13 #include "components/toolbar/toolbar_model.h" |
13 #include "content/public/browser/navigation_entry.h" | 14 #include "content/public/browser/navigation_entry.h" |
14 #include "grit/ash_resources.h" | 15 #include "grit/ash_resources.h" |
15 #include "ui/views/layout/box_layout.h" | 16 #include "ui/views/layout/box_layout.h" |
16 | 17 |
17 // static | 18 // static |
18 const char WebAppLeftHeaderView::kViewClassName[] = "WebAppLeftHeaderView"; | 19 const char WebAppLeftHeaderView::kViewClassName[] = "WebAppLeftHeaderView"; |
19 | 20 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 content::WebContents* tab = browser_view_->GetActiveWebContents(); | 84 content::WebContents* tab = browser_view_->GetActiveWebContents(); |
84 if (!tab) | 85 if (!tab) |
85 return; | 86 return; |
86 | 87 |
87 // Important to use GetVisibleEntry to match what's showing in the title area. | 88 // Important to use GetVisibleEntry to match what's showing in the title area. |
88 content::NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry(); | 89 content::NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry(); |
89 // The visible entry can be NULL in the case of window.open(""). | 90 // The visible entry can be NULL in the case of window.open(""). |
90 if (!nav_entry) | 91 if (!nav_entry) |
91 return; | 92 return; |
92 | 93 |
93 SecurityStateModel* security_model = SecurityStateModel::FromWebContents(tab); | 94 ChromeSecurityStateModelDelegate* security_model_delegate = |
94 DCHECK(security_model); | 95 ChromeSecurityStateModelDelegate::FromWebContents(tab); |
| 96 DCHECK(security_model_delegate); |
95 | 97 |
96 chrome::ShowWebsiteSettings(browser_view_->browser(), tab, | 98 chrome::ShowWebsiteSettings(browser_view_->browser(), tab, |
97 nav_entry->GetURL(), | 99 nav_entry->GetURL(), |
98 security_model->GetSecurityInfo()); | 100 security_model_delegate->GetSecurityInfo()); |
99 } | 101 } |
OLD | NEW |