OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 #include "components/bookmarks/browser/bookmark_model.h" | 160 #include "components/bookmarks/browser/bookmark_model.h" |
161 #include "components/bookmarks/browser/bookmark_utils.h" | 161 #include "components/bookmarks/browser/bookmark_utils.h" |
162 #include "components/bookmarks/common/bookmark_pref_names.h" | 162 #include "components/bookmarks/common/bookmark_pref_names.h" |
163 #include "components/browser_sync/profile_sync_service.h" | 163 #include "components/browser_sync/profile_sync_service.h" |
164 #include "components/bubble/bubble_controller.h" | 164 #include "components/bubble/bubble_controller.h" |
165 #include "components/content_settings/core/browser/host_content_settings_map.h" | 165 #include "components/content_settings/core/browser/host_content_settings_map.h" |
166 #include "components/favicon/content/content_favicon_driver.h" | 166 #include "components/favicon/content/content_favicon_driver.h" |
167 #include "components/history/core/browser/top_sites.h" | 167 #include "components/history/core/browser/top_sites.h" |
168 #include "components/prefs/pref_service.h" | 168 #include "components/prefs/pref_service.h" |
169 #include "components/search/search.h" | 169 #include "components/search/search.h" |
170 #include "components/security_state/security_state_model.h" | 170 #include "components/security_state/content/web_contents_security_state_model.h" |
| 171 #include "components/security_state/core/security_state_model.h" |
171 #include "components/sessions/core/session_types.h" | 172 #include "components/sessions/core/session_types.h" |
172 #include "components/sessions/core/tab_restore_service.h" | 173 #include "components/sessions/core/tab_restore_service.h" |
173 #include "components/startup_metric_utils/browser/startup_metric_utils.h" | 174 #include "components/startup_metric_utils/browser/startup_metric_utils.h" |
174 #include "components/toolbar/toolbar_model_impl.h" | 175 #include "components/toolbar/toolbar_model_impl.h" |
175 #include "components/translate/core/browser/language_state.h" | 176 #include "components/translate/core/browser/language_state.h" |
176 #include "components/web_modal/web_contents_modal_dialog_manager.h" | 177 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
177 #include "components/zoom/zoom_controller.h" | 178 #include "components/zoom/zoom_controller.h" |
178 #include "content/public/browser/devtools_agent_host.h" | 179 #include "content/public/browser/devtools_agent_host.h" |
179 #include "content/public/browser/interstitial_page.h" | 180 #include "content/public/browser/interstitial_page.h" |
180 #include "content/public/browser/invalidate_type.h" | 181 #include "content/public/browser/invalidate_type.h" |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 } | 1278 } |
1278 | 1279 |
1279 blink::WebSecurityStyle Browser::GetSecurityStyle( | 1280 blink::WebSecurityStyle Browser::GetSecurityStyle( |
1280 WebContents* web_contents, | 1281 WebContents* web_contents, |
1281 content::SecurityStyleExplanations* security_style_explanations) { | 1282 content::SecurityStyleExplanations* security_style_explanations) { |
1282 ChromeSecurityStateModelClient* model_client = | 1283 ChromeSecurityStateModelClient* model_client = |
1283 ChromeSecurityStateModelClient::FromWebContents(web_contents); | 1284 ChromeSecurityStateModelClient::FromWebContents(web_contents); |
1284 DCHECK(model_client); | 1285 DCHECK(model_client); |
1285 security_state::SecurityStateModel::SecurityInfo security_info; | 1286 security_state::SecurityStateModel::SecurityInfo security_info; |
1286 model_client->GetSecurityInfo(&security_info); | 1287 model_client->GetSecurityInfo(&security_info); |
1287 return model_client->GetSecurityStyle(security_info, | 1288 return security_state::WebContentsSecurityStateModel::GetSecurityStyle( |
1288 security_style_explanations); | 1289 security_info, security_style_explanations); |
1289 } | 1290 } |
1290 | 1291 |
1291 void Browser::ShowCertificateViewerInDevTools( | 1292 void Browser::ShowCertificateViewerInDevTools( |
1292 content::WebContents* web_contents, | 1293 content::WebContents* web_contents, |
1293 scoped_refptr<net::X509Certificate> certificate) { | 1294 scoped_refptr<net::X509Certificate> certificate) { |
1294 DevToolsWindow* devtools_window = | 1295 DevToolsWindow* devtools_window = |
1295 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); | 1296 DevToolsWindow::GetInstanceForInspectedWebContents(web_contents); |
1296 if (devtools_window) | 1297 if (devtools_window) |
1297 devtools_window->ShowCertificateViewer(certificate); | 1298 devtools_window->ShowCertificateViewer(certificate); |
1298 } | 1299 } |
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2577 if (contents && !allow_js_access) { | 2578 if (contents && !allow_js_access) { |
2578 contents->web_contents()->GetController().LoadURL( | 2579 contents->web_contents()->GetController().LoadURL( |
2579 target_url, | 2580 target_url, |
2580 content::Referrer(), | 2581 content::Referrer(), |
2581 ui::PAGE_TRANSITION_LINK, | 2582 ui::PAGE_TRANSITION_LINK, |
2582 std::string()); // No extra headers. | 2583 std::string()); // No extra headers. |
2583 } | 2584 } |
2584 | 2585 |
2585 return contents != NULL; | 2586 return contents != NULL; |
2586 } | 2587 } |
OLD | NEW |