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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 27635002: Content settings for <audio> and <video>. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test fix. Created 6 years, 5 months 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 (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/website_settings/website_settings.h" 5 #include "chrome/browser/ui/website_settings/website_settings.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 using base::UTF8ToUTF16; 55 using base::UTF8ToUTF16;
56 using base::UTF16ToUTF8; 56 using base::UTF16ToUTF8;
57 using content::BrowserThread; 57 using content::BrowserThread;
58 58
59 namespace { 59 namespace {
60 60
61 // The list of content settings types to display on the Website Settings UI. 61 // The list of content settings types to display on the Website Settings UI.
62 ContentSettingsType kPermissionType[] = { 62 ContentSettingsType kPermissionType[] = {
63 CONTENT_SETTINGS_TYPE_IMAGES, 63 CONTENT_SETTINGS_TYPE_IMAGES,
64 CONTENT_SETTINGS_TYPE_JAVASCRIPT, 64 CONTENT_SETTINGS_TYPE_JAVASCRIPT,
65 CONTENT_SETTINGS_TYPE_MEDIA,
65 CONTENT_SETTINGS_TYPE_PLUGINS, 66 CONTENT_SETTINGS_TYPE_PLUGINS,
66 CONTENT_SETTINGS_TYPE_POPUPS, 67 CONTENT_SETTINGS_TYPE_POPUPS,
67 CONTENT_SETTINGS_TYPE_GEOLOCATION, 68 CONTENT_SETTINGS_TYPE_GEOLOCATION,
68 CONTENT_SETTINGS_TYPE_NOTIFICATIONS, 69 CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
69 CONTENT_SETTINGS_TYPE_FULLSCREEN, 70 CONTENT_SETTINGS_TYPE_FULLSCREEN,
70 CONTENT_SETTINGS_TYPE_MOUSELOCK, 71 CONTENT_SETTINGS_TYPE_MOUSELOCK,
71 CONTENT_SETTINGS_TYPE_MEDIASTREAM, 72 CONTENT_SETTINGS_TYPE_MEDIASTREAM,
72 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, 73 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
73 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 74 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
74 }; 75 };
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // location permission for iframed content. 184 // location permission for iframed content.
184 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_); 185 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_);
185 secondary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_); 186 secondary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_);
186 break; 187 break;
187 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 188 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
188 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_); 189 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_);
189 secondary_pattern = ContentSettingsPattern::Wildcard(); 190 secondary_pattern = ContentSettingsPattern::Wildcard();
190 break; 191 break;
191 case CONTENT_SETTINGS_TYPE_IMAGES: 192 case CONTENT_SETTINGS_TYPE_IMAGES:
192 case CONTENT_SETTINGS_TYPE_JAVASCRIPT: 193 case CONTENT_SETTINGS_TYPE_JAVASCRIPT:
194 case CONTENT_SETTINGS_TYPE_MEDIA:
193 case CONTENT_SETTINGS_TYPE_PLUGINS: 195 case CONTENT_SETTINGS_TYPE_PLUGINS:
194 case CONTENT_SETTINGS_TYPE_POPUPS: 196 case CONTENT_SETTINGS_TYPE_POPUPS:
195 case CONTENT_SETTINGS_TYPE_FULLSCREEN: 197 case CONTENT_SETTINGS_TYPE_FULLSCREEN:
196 case CONTENT_SETTINGS_TYPE_MOUSELOCK: 198 case CONTENT_SETTINGS_TYPE_MOUSELOCK:
197 case CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS: 199 case CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS:
198 primary_pattern = ContentSettingsPattern::FromURL(site_url_); 200 primary_pattern = ContentSettingsPattern::FromURL(site_url_);
199 secondary_pattern = ContentSettingsPattern::Wildcard(); 201 secondary_pattern = ContentSettingsPattern::Wildcard();
200 break; 202 break;
201 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: { 203 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: {
202 // We need to use the same same patterns as other places like infobar code 204 // We need to use the same same patterns as other places like infobar code
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 if (visited_before_today) { 687 if (visited_before_today) {
686 first_visit_text = l10n_util::GetStringFUTF16( 688 first_visit_text = l10n_util::GetStringFUTF16(
687 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, 689 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY,
688 base::TimeFormatShortDate(first_visit)); 690 base::TimeFormatShortDate(first_visit));
689 } else { 691 } else {
690 first_visit_text = l10n_util::GetStringUTF16( 692 first_visit_text = l10n_util::GetStringUTF16(
691 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); 693 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY);
692 } 694 }
693 ui_->SetFirstVisit(first_visit_text); 695 ui_->SetFirstVisit(first_visit_text);
694 } 696 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698