| 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 #if defined(OS_WIN) |     7 #if defined(OS_WIN) | 
|     8 #include <windows.h> |     8 #include <windows.h> | 
|     9 #include <shellapi.h> |     9 #include <shellapi.h> | 
|    10 #endif  // defined(OS_WIN) |    10 #endif  // defined(OS_WIN) | 
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|    69 #include "chrome/browser/profiles/profile_destroyer.h" |    69 #include "chrome/browser/profiles/profile_destroyer.h" | 
|    70 #include "chrome/browser/profiles/profile_metrics.h" |    70 #include "chrome/browser/profiles/profile_metrics.h" | 
|    71 #include "chrome/browser/profiles/profiles_state.h" |    71 #include "chrome/browser/profiles/profiles_state.h" | 
|    72 #include "chrome/browser/repost_form_warning_controller.h" |    72 #include "chrome/browser/repost_form_warning_controller.h" | 
|    73 #include "chrome/browser/search/search.h" |    73 #include "chrome/browser/search/search.h" | 
|    74 #include "chrome/browser/sessions/session_restore.h" |    74 #include "chrome/browser/sessions/session_restore.h" | 
|    75 #include "chrome/browser/sessions/session_service.h" |    75 #include "chrome/browser/sessions/session_service.h" | 
|    76 #include "chrome/browser/sessions/session_service_factory.h" |    76 #include "chrome/browser/sessions/session_service_factory.h" | 
|    77 #include "chrome/browser/sessions/session_tab_helper.h" |    77 #include "chrome/browser/sessions/session_tab_helper.h" | 
|    78 #include "chrome/browser/sessions/tab_restore_service_factory.h" |    78 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 
 |    79 #include "chrome/browser/ssl/chrome_security_state_model_client.h" | 
|    79 #include "chrome/browser/ssl/security_state_model.h" |    80 #include "chrome/browser/ssl/security_state_model.h" | 
|    80 #include "chrome/browser/sync/profile_sync_service_factory.h" |    81 #include "chrome/browser/sync/profile_sync_service_factory.h" | 
|    81 #include "chrome/browser/sync/sync_ui_util.h" |    82 #include "chrome/browser/sync/sync_ui_util.h" | 
|    82 #include "chrome/browser/tab_contents/retargeting_details.h" |    83 #include "chrome/browser/tab_contents/retargeting_details.h" | 
|    83 #include "chrome/browser/tab_contents/tab_util.h" |    84 #include "chrome/browser/tab_contents/tab_util.h" | 
|    84 #include "chrome/browser/task_management/web_contents_tags.h" |    85 #include "chrome/browser/task_management/web_contents_tags.h" | 
|    85 #include "chrome/browser/themes/theme_service.h" |    86 #include "chrome/browser/themes/theme_service.h" | 
|    86 #include "chrome/browser/themes/theme_service_factory.h" |    87 #include "chrome/browser/themes/theme_service_factory.h" | 
|    87 #include "chrome/browser/translate/chrome_translate_client.h" |    88 #include "chrome/browser/translate/chrome_translate_client.h" | 
|    88 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" |    89 #include "chrome/browser/ui/autofill/chrome_autofill_client.h" | 
| (...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1306   if ((operations_allowed & blink::WebDragOperationLink) && |  1307   if ((operations_allowed & blink::WebDragOperationLink) && | 
|  1307       chrome::SettingsWindowManager::GetInstance()->IsSettingsBrowser(this)) { |  1308       chrome::SettingsWindowManager::GetInstance()->IsSettingsBrowser(this)) { | 
|  1308     return false; |  1309     return false; | 
|  1309   } |  1310   } | 
|  1310   return true; |  1311   return true; | 
|  1311 } |  1312 } | 
|  1312  |  1313  | 
|  1313 content::SecurityStyle Browser::GetSecurityStyle( |  1314 content::SecurityStyle Browser::GetSecurityStyle( | 
|  1314     WebContents* web_contents, |  1315     WebContents* web_contents, | 
|  1315     content::SecurityStyleExplanations* security_style_explanations) { |  1316     content::SecurityStyleExplanations* security_style_explanations) { | 
|  1316   SecurityStateModel* model = SecurityStateModel::FromWebContents(web_contents); |  1317   ChromeSecurityStateModelClient* model_client = | 
|  1317   DCHECK(model); |  1318       ChromeSecurityStateModelClient::FromWebContents(web_contents); | 
 |  1319   DCHECK(model_client); | 
|  1318   const SecurityStateModel::SecurityInfo& security_info = |  1320   const SecurityStateModel::SecurityInfo& security_info = | 
|  1319       model->GetSecurityInfo(); |  1321       model_client->GetSecurityInfo(); | 
|  1320  |  1322  | 
|  1321   const content::SecurityStyle security_style = |  1323   const content::SecurityStyle security_style = | 
|  1322       SecurityLevelToSecurityStyle(security_info.security_level); |  1324       SecurityLevelToSecurityStyle(security_info.security_level); | 
|  1323  |  1325  | 
|  1324   security_style_explanations->ran_insecure_content_style = |  1326   security_style_explanations->ran_insecure_content_style = | 
|  1325       SecurityStateModel::kRanInsecureContentStyle; |  1327       SecurityStateModel::kRanInsecureContentStyle; | 
|  1326   security_style_explanations->displayed_insecure_content_style = |  1328   security_style_explanations->displayed_insecure_content_style = | 
|  1327       SecurityStateModel::kDisplayedInsecureContentStyle; |  1329       SecurityStateModel::kDisplayedInsecureContentStyle; | 
|  1328  |  1330  | 
|  1329   // Check if the page is HTTP; if so, no explanations are needed. Note |  1331   // Check if the page is HTTP; if so, no explanations are needed. Note | 
| (...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2704   if (contents && !allow_js_access) { |  2706   if (contents && !allow_js_access) { | 
|  2705     contents->web_contents()->GetController().LoadURL( |  2707     contents->web_contents()->GetController().LoadURL( | 
|  2706         target_url, |  2708         target_url, | 
|  2707         content::Referrer(), |  2709         content::Referrer(), | 
|  2708         ui::PAGE_TRANSITION_LINK, |  2710         ui::PAGE_TRANSITION_LINK, | 
|  2709         std::string());  // No extra headers. |  2711         std::string());  // No extra headers. | 
|  2710   } |  2712   } | 
|  2711  |  2713  | 
|  2712   return contents != NULL; |  2714   return contents != NULL; | 
|  2713 } |  2715 } | 
| OLD | NEW |