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/content_settings/tab_specific_content_settings.h" | 5 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 content::NotificationService::current()->Notify( | 344 content::NotificationService::current()->Notify( |
345 chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED, | 345 chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED, |
346 content::Source<WebContents>(web_contents()), | 346 content::Source<WebContents>(web_contents()), |
347 content::NotificationService::NoDetails()); | 347 content::NotificationService::NoDetails()); |
348 | 348 |
349 if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) { | 349 if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) { |
350 content_settings::RecordMixedScriptAction( | 350 content_settings::RecordMixedScriptAction( |
351 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD); | 351 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD); |
352 content_settings::RecordMixedScriptActionWithRAPPOR( | 352 content_settings::RecordMixedScriptActionWithRAPPOR( |
353 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD, | 353 content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD, |
354 GURL(base::UTF16ToUTF8(details))); | 354 GURL(details)); |
355 } | 355 } |
356 } | 356 } |
357 } | 357 } |
358 | 358 |
359 void TabSpecificContentSettings::OnContentAllowed(ContentSettingsType type) { | 359 void TabSpecificContentSettings::OnContentAllowed(ContentSettingsType type) { |
360 DCHECK(type != CONTENT_SETTINGS_TYPE_GEOLOCATION) | 360 DCHECK(type != CONTENT_SETTINGS_TYPE_GEOLOCATION) |
361 << "Geolocation settings handled by OnGeolocationPermissionSet"; | 361 << "Geolocation settings handled by OnGeolocationPermissionSet"; |
362 DCHECK(type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC && | 362 DCHECK(type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC && |
363 type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA) | 363 type != CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA) |
364 << "Media stream settings handled by OnMediaStreamPermissionSet"; | 364 << "Media stream settings handled by OnMediaStreamPermissionSet"; |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
820 | 820 |
821 void TabSpecificContentSettings::GeolocationDidNavigate( | 821 void TabSpecificContentSettings::GeolocationDidNavigate( |
822 const content::LoadCommittedDetails& details) { | 822 const content::LoadCommittedDetails& details) { |
823 geolocation_usages_state_.DidNavigate(GetCommittedDetails(details)); | 823 geolocation_usages_state_.DidNavigate(GetCommittedDetails(details)); |
824 } | 824 } |
825 | 825 |
826 void TabSpecificContentSettings::MidiDidNavigate( | 826 void TabSpecificContentSettings::MidiDidNavigate( |
827 const content::LoadCommittedDetails& details) { | 827 const content::LoadCommittedDetails& details) { |
828 midi_usages_state_.DidNavigate(GetCommittedDetails(details)); | 828 midi_usages_state_.DidNavigate(GetCommittedDetails(details)); |
829 } | 829 } |
OLD | NEW |