| OLD | NEW |
| 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/content_settings/content_setting_bubble_model.h" | 5 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
| 14 #include "chrome/browser/content_settings/chrome_content_settings_utils.h" | 15 #include "chrome/browser/content_settings/chrome_content_settings_utils.h" |
| 15 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 16 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 16 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 17 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 17 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 18 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
| 18 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" | 19 #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" |
| 19 #include "chrome/browser/infobars/infobar_service.h" | 20 #include "chrome/browser/infobars/infobar_service.h" |
| 20 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 21 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 21 #include "chrome/browser/permissions/permission_util.h" | 22 #include "chrome/browser/permissions/permission_util.h" |
| 22 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 23 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
| (...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() { | 979 void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() { |
| 979 DCHECK(web_contents()); | 980 DCHECK(web_contents()); |
| 980 web_contents()->SendToAllFrames( | 981 web_contents()->SendToAllFrames( |
| 981 new ChromeViewMsg_SetAllowRunningInsecureContent(MSG_ROUTING_NONE, true)); | 982 new ChromeViewMsg_SetAllowRunningInsecureContent(MSG_ROUTING_NONE, true)); |
| 982 web_contents()->GetMainFrame()->Send(new ChromeViewMsg_ReloadFrame( | 983 web_contents()->GetMainFrame()->Send(new ChromeViewMsg_ReloadFrame( |
| 983 web_contents()->GetMainFrame()->GetRoutingID())); | 984 web_contents()->GetMainFrame()->GetRoutingID())); |
| 984 | 985 |
| 985 content_settings::RecordMixedScriptAction( | 986 content_settings::RecordMixedScriptAction( |
| 986 content_settings::MIXED_SCRIPT_ACTION_CLICKED_ALLOW); | 987 content_settings::MIXED_SCRIPT_ACTION_CLICKED_ALLOW); |
| 987 content_settings::RecordMixedScriptActionWithRAPPOR( | 988 content_settings::RecordMixedScriptActionWithRAPPOR( |
| 989 g_browser_process->rappor_service(), |
| 988 content_settings::MIXED_SCRIPT_ACTION_CLICKED_ALLOW, | 990 content_settings::MIXED_SCRIPT_ACTION_CLICKED_ALLOW, |
| 989 web_contents()->GetLastCommittedURL()); | 991 web_contents()->GetLastCommittedURL()); |
| 990 } | 992 } |
| 991 | 993 |
| 992 // ContentSettingRPHBubbleModel ------------------------------------------------ | 994 // ContentSettingRPHBubbleModel ------------------------------------------------ |
| 993 | 995 |
| 994 ContentSettingRPHBubbleModel::ContentSettingRPHBubbleModel( | 996 ContentSettingRPHBubbleModel::ContentSettingRPHBubbleModel( |
| 995 Delegate* delegate, | 997 Delegate* delegate, |
| 996 WebContents* web_contents, | 998 WebContents* web_contents, |
| 997 Profile* profile, | 999 Profile* profile, |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 ContentSettingBubbleModel::AsSimpleBubbleModel() { | 1315 ContentSettingBubbleModel::AsSimpleBubbleModel() { |
| 1314 // In general, bubble models might not inherit from the simple bubble model. | 1316 // In general, bubble models might not inherit from the simple bubble model. |
| 1315 return nullptr; | 1317 return nullptr; |
| 1316 } | 1318 } |
| 1317 | 1319 |
| 1318 ContentSettingMediaStreamBubbleModel* | 1320 ContentSettingMediaStreamBubbleModel* |
| 1319 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { | 1321 ContentSettingBubbleModel::AsMediaStreamBubbleModel() { |
| 1320 // In general, bubble models might not inherit from the media bubble model. | 1322 // In general, bubble models might not inherit from the media bubble model. |
| 1321 return nullptr; | 1323 return nullptr; |
| 1322 } | 1324 } |
| OLD | NEW |