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/permission_context_uma_util.h" | 9 #include "chrome/browser/content_settings/permission_context_uma_util.h" |
10 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" | 10 #include "chrome/browser/geolocation/geolocation_infobar_delegate.h" |
11 #include "chrome/browser/infobars/infobar_service.h" | 11 #include "chrome/browser/infobars/infobar_service.h" |
12 #include "chrome/browser/media/midi_permission_infobar_delegate.h" | 12 #include "chrome/browser/media/midi_permission_infobar_delegate.h" |
13 #include "chrome/browser/notifications/desktop_notification_infobar_delegate.h" | 13 #include "chrome/browser/notifications/desktop_notification_infobar_delegate.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/services/gcm/push_messaging_infobar_delegate.h" | |
16 #include "chrome/browser/tab_contents/tab_util.h" | 15 #include "chrome/browser/tab_contents/tab_util.h" |
17 #include "chrome/common/pref_names.h" | 16 #include "chrome/common/pref_names.h" |
18 #include "components/content_settings/core/browser/host_content_settings_map.h" | 17 #include "components/content_settings/core/browser/host_content_settings_map.h" |
19 #include "components/content_settings/core/common/content_settings.h" | 18 #include "components/content_settings/core/common/content_settings.h" |
20 #include "components/infobars/core/infobar.h" | 19 #include "components/infobars/core/infobar.h" |
21 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/notification_details.h" | 21 #include "content/public/browser/notification_details.h" |
23 #include "content/public/browser/notification_source.h" | 22 #include "content/public/browser/notification_source.h" |
24 #include "content/public/browser/notification_types.h" | 23 #include "content/public/browser/notification_types.h" |
25 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 infobar_ = DesktopNotificationInfoBarDelegate::Create( | 113 infobar_ = DesktopNotificationInfoBarDelegate::Create( |
115 GetInfoBarService(id_), controller, id_, requesting_frame_, | 114 GetInfoBarService(id_), controller, id_, requesting_frame_, |
116 display_languages); | 115 display_languages); |
117 break; | 116 break; |
118 #endif // ENABLE_NOTIFICATIONS | 117 #endif // ENABLE_NOTIFICATIONS |
119 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: | 118 case CONTENT_SETTINGS_TYPE_MIDI_SYSEX: |
120 infobar_ = MidiPermissionInfoBarDelegate::Create( | 119 infobar_ = MidiPermissionInfoBarDelegate::Create( |
121 GetInfoBarService(id_), controller, id_, requesting_frame_, | 120 GetInfoBarService(id_), controller, id_, requesting_frame_, |
122 display_languages, type_); | 121 display_languages, type_); |
123 break; | 122 break; |
124 case CONTENT_SETTINGS_TYPE_PUSH_MESSAGING: | |
125 infobar_ = gcm::PushMessagingInfoBarDelegate::Create( | |
126 GetInfoBarService(id_), controller, id_, requesting_frame_, | |
127 display_languages, type_); | |
128 break; | |
129 #if defined(OS_ANDROID) | 123 #if defined(OS_ANDROID) |
130 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER: | 124 case CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER: |
131 infobar_ = ProtectedMediaIdentifierInfoBarDelegate::Create( | 125 infobar_ = ProtectedMediaIdentifierInfoBarDelegate::Create( |
132 GetInfoBarService(id_), controller, id_, requesting_frame_, | 126 GetInfoBarService(id_), controller, id_, requesting_frame_, |
133 display_languages); | 127 display_languages); |
134 break; | 128 break; |
135 #endif | 129 #endif |
136 default: | 130 default: |
137 NOTREACHED(); | 131 NOTREACHED(); |
138 break; | 132 break; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 ContentSettingsPattern::Wildcard() : | 369 ContentSettingsPattern::Wildcard() : |
376 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()); | 370 ContentSettingsPattern::FromURLNoWildcard(embedder.GetOrigin()); |
377 | 371 |
378 profile_->GetHostContentSettingsMap()->SetContentSetting( | 372 profile_->GetHostContentSettingsMap()->SetContentSetting( |
379 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), | 373 ContentSettingsPattern::FromURLNoWildcard(requesting_frame.GetOrigin()), |
380 embedder_pattern, | 374 embedder_pattern, |
381 type_, | 375 type_, |
382 std::string(), | 376 std::string(), |
383 content_setting); | 377 content_setting); |
384 } | 378 } |
OLD | NEW |