Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: chrome/browser/content_settings/permission_queue_controller.cc

Issue 785993003: [Push] Register: require user-visible to be present in the manifest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test after mock behavior change that was recently introduced Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698