| 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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 blink::WebDragOperationsMask operations_allowed) { | 1269 blink::WebDragOperationsMask operations_allowed) { |
| 1270 // Disallow drag-and-drop navigation for Settings windows which do not support | 1270 // Disallow drag-and-drop navigation for Settings windows which do not support |
| 1271 // external navigation. | 1271 // external navigation. |
| 1272 if ((operations_allowed & blink::WebDragOperationLink) && | 1272 if ((operations_allowed & blink::WebDragOperationLink) && |
| 1273 chrome::SettingsWindowManager::GetInstance()->IsSettingsBrowser(this)) { | 1273 chrome::SettingsWindowManager::GetInstance()->IsSettingsBrowser(this)) { |
| 1274 return false; | 1274 return false; |
| 1275 } | 1275 } |
| 1276 return true; | 1276 return true; |
| 1277 } | 1277 } |
| 1278 | 1278 |
| 1279 content::SecurityStyle Browser::GetSecurityStyle( | 1279 blink::WebSecurityStyle Browser::GetSecurityStyle( |
| 1280 WebContents* web_contents, | 1280 WebContents* web_contents, |
| 1281 content::SecurityStyleExplanations* security_style_explanations) { | 1281 content::SecurityStyleExplanations* security_style_explanations) { |
| 1282 ChromeSecurityStateModelClient* model_client = | 1282 ChromeSecurityStateModelClient* model_client = |
| 1283 ChromeSecurityStateModelClient::FromWebContents(web_contents); | 1283 ChromeSecurityStateModelClient::FromWebContents(web_contents); |
| 1284 DCHECK(model_client); | 1284 DCHECK(model_client); |
| 1285 security_state::SecurityStateModel::SecurityInfo security_info; | 1285 security_state::SecurityStateModel::SecurityInfo security_info; |
| 1286 model_client->GetSecurityInfo(&security_info); | 1286 model_client->GetSecurityInfo(&security_info); |
| 1287 return model_client->GetSecurityStyle(security_info, | 1287 return model_client->GetSecurityStyle(security_info, |
| 1288 security_style_explanations); | 1288 security_style_explanations); |
| 1289 } | 1289 } |
| (...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2570 if (contents && !allow_js_access) { | 2570 if (contents && !allow_js_access) { |
| 2571 contents->web_contents()->GetController().LoadURL( | 2571 contents->web_contents()->GetController().LoadURL( |
| 2572 target_url, | 2572 target_url, |
| 2573 content::Referrer(), | 2573 content::Referrer(), |
| 2574 ui::PAGE_TRANSITION_LINK, | 2574 ui::PAGE_TRANSITION_LINK, |
| 2575 std::string()); // No extra headers. | 2575 std::string()); // No extra headers. |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 return contents != NULL; | 2578 return contents != NULL; |
| 2579 } | 2579 } |
| OLD | NEW |