| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/content_settings/permission_queue_controller.h" | 5 #include "chrome/browser/content_settings/permission_queue_controller.h" |
| 6 | 6 |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/content_settings/host_content_settings_map.h" | 9 #include "chrome/browser/content_settings/host_content_settings_map.h" |
| 10 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" | 10 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // TODO(toyoshim): Remove following ContentType dependent code. | 102 // TODO(toyoshim): Remove following ContentType dependent code. |
| 103 // Also these InfoBarDelegate can share much more code each other. | 103 // Also these InfoBarDelegate can share much more code each other. |
| 104 // http://crbug.com/266743 | 104 // http://crbug.com/266743 |
| 105 switch (type_) { | 105 switch (type_) { |
| 106 case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 106 case CONTENT_SETTINGS_TYPE_GEOLOCATION: |
| 107 infobar_ = GeolocationInfoBarDelegate::Create( | 107 infobar_ = GeolocationInfoBarDelegate::Create( |
| 108 GetInfoBarService(id_), controller, id_, requesting_frame_, | 108 GetInfoBarService(id_), controller, id_, requesting_frame_, |
| 109 display_languages); | 109 display_languages); |
| 110 break; | 110 break; |
| 111 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: | 111 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: |
| 112 infobar_ = MIDIPermissionInfoBarDelegate::Create( | 112 infobar_ = MidiPermissionInfoBarDelegate::Create( |
| 113 GetInfoBarService(id_), controller, id_, requesting_frame_, | 113 GetInfoBarService(id_), controller, id_, requesting_frame_, |
| 114 display_languages); | 114 display_languages); |
| 115 break; | 115 break; |
| 116 #if defined(OS_ANDROID) | 116 #if defined(OS_ANDROID) |
| 117 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER: | 117 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER: |
| 118 infobar_ = ProtectedMediaIdentifierInfoBarDelegate::Create( | 118 infobar_ = ProtectedMediaIdentifierInfoBarDelegate::Create( |
| 119 GetInfoBarService(id_), controller, id_, requesting_frame_, | 119 GetInfoBarService(id_), controller, id_, requesting_frame_, |
| 120 display_languages); | 120 display_languages); |
| 121 break; | 121 break; |
| 122 #endif | 122 #endif |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 | 373 |
| 374 ContentSetting content_setting = | 374 ContentSetting content_setting = |
| 375 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; | 375 allowed ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK; |
| 376 profile_->GetHostContentSettingsMap()->SetContentSetting( | 376 profile_->GetHostContentSettingsMap()->SetContentSetting( |
| 377 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), | 377 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), |
| 378 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()), | 378 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()), |
| 379 type_, | 379 type_, |
| 380 std::string(), | 380 std::string(), |
| 381 content_setting); | 381 content_setting); |
| 382 } | 382 } |
| OLD | NEW |