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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 12225076: Delete most web intents code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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 | Annotate | Revision Log
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/webui/options/content_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const char* kVideoSetting = "video"; 79 const char* kVideoSetting = "video";
80 80
81 const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = { 81 const ContentSettingsTypeNameEntry kContentSettingsTypeGroupNames[] = {
82 {CONTENT_SETTINGS_TYPE_COOKIES, "cookies"}, 82 {CONTENT_SETTINGS_TYPE_COOKIES, "cookies"},
83 {CONTENT_SETTINGS_TYPE_IMAGES, "images"}, 83 {CONTENT_SETTINGS_TYPE_IMAGES, "images"},
84 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, "javascript"}, 84 {CONTENT_SETTINGS_TYPE_JAVASCRIPT, "javascript"},
85 {CONTENT_SETTINGS_TYPE_PLUGINS, "plugins"}, 85 {CONTENT_SETTINGS_TYPE_PLUGINS, "plugins"},
86 {CONTENT_SETTINGS_TYPE_POPUPS, "popups"}, 86 {CONTENT_SETTINGS_TYPE_POPUPS, "popups"},
87 {CONTENT_SETTINGS_TYPE_GEOLOCATION, "location"}, 87 {CONTENT_SETTINGS_TYPE_GEOLOCATION, "location"},
88 {CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications"}, 88 {CONTENT_SETTINGS_TYPE_NOTIFICATIONS, "notifications"},
89 {CONTENT_SETTINGS_TYPE_INTENTS, "intents"},
90 {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"}, 89 {CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"},
91 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"}, 90 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"},
92 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"}, 91 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"},
93 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"}, 92 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"},
94 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"}, 93 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"},
95 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"}, 94 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"},
96 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"}, 95 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"},
97 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"}, 96 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"},
98 }; 97 };
99 98
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 658 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
660 UpdateNotificationExceptionsView(); 659 UpdateNotificationExceptionsView();
661 break; 660 break;
662 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: 661 case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
663 UpdateMediaSettingsView(); 662 UpdateMediaSettingsView();
664 break; 663 break;
665 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: 664 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC:
666 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: 665 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA:
667 UpdateMediaExceptionsView(); 666 UpdateMediaExceptionsView();
668 break; 667 break;
669 case CONTENT_SETTINGS_TYPE_INTENTS:
670 // Don't update intents settings at this point.
671 // Turn on when enable_web_intents_tag is enabled.
672 break;
673 case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT: 668 case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT:
674 // We don't yet support exceptions for mixed scripting. 669 // We don't yet support exceptions for mixed scripting.
675 break; 670 break;
676 case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE: 671 case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE:
677 // The content settings type CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE 672 // The content settings type CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE
678 // is supposed to be set by policy only. Hence there is no user facing UI 673 // is supposed to be set by policy only. Hence there is no user facing UI
679 // for this content type and we skip it here. 674 // for this content type and we skip it here.
680 break; 675 break;
681 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS: 676 case CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS:
682 // The RPH settings are retrieved separately. 677 // The RPH settings are retrieved separately.
683 break; 678 break;
684 #if defined(OS_WIN) 679 #if defined(OS_WIN)
685 case CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP: 680 case CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP:
686 break; 681 break;
687 #endif 682 #endif
688 default: 683 default:
689 UpdateExceptionsViewFromHostContentSettingsMap(type); 684 UpdateExceptionsViewFromHostContentSettingsMap(type);
690 break; 685 break;
691 } 686 }
692 } 687 }
693 688
694 void ContentSettingsHandler::UpdateOTRExceptionsViewFromModel( 689 void ContentSettingsHandler::UpdateOTRExceptionsViewFromModel(
695 ContentSettingsType type) { 690 ContentSettingsType type) {
696 switch (type) { 691 switch (type) {
697 case CONTENT_SETTINGS_TYPE_GEOLOCATION: 692 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
698 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 693 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
699 case CONTENT_SETTINGS_TYPE_INTENTS:
700 case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE: 694 case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE:
701 case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT: 695 case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT:
702 #if defined(OS_WIN) 696 #if defined(OS_WIN)
703 case CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP: 697 case CONTENT_SETTINGS_TYPE_METRO_SWITCH_TO_DESKTOP:
704 #endif 698 #endif
705 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: 699 case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
706 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC: 700 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC:
707 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA: 701 case CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA:
708 break; 702 break;
709 default: 703 default:
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 UserMetricsAction("Options_DefaultPopupsSettingChanged")); 1189 UserMetricsAction("Options_DefaultPopupsSettingChanged"));
1196 break; 1190 break;
1197 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: 1191 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
1198 content::RecordAction( 1192 content::RecordAction(
1199 UserMetricsAction("Options_DefaultNotificationsSettingChanged")); 1193 UserMetricsAction("Options_DefaultNotificationsSettingChanged"));
1200 break; 1194 break;
1201 case CONTENT_SETTINGS_TYPE_GEOLOCATION: 1195 case CONTENT_SETTINGS_TYPE_GEOLOCATION:
1202 content::RecordAction( 1196 content::RecordAction(
1203 UserMetricsAction("Options_DefaultGeolocationSettingChanged")); 1197 UserMetricsAction("Options_DefaultGeolocationSettingChanged"));
1204 break; 1198 break;
1205 case CONTENT_SETTINGS_TYPE_INTENTS:
1206 content::RecordAction(
1207 UserMetricsAction("Options_DefaultHandlersSettingChanged"));
1208 break;
1209 case CONTENT_SETTINGS_TYPE_MOUSELOCK: 1199 case CONTENT_SETTINGS_TYPE_MOUSELOCK:
1210 content::RecordAction( 1200 content::RecordAction(
1211 UserMetricsAction("Options_DefaultMouseLockSettingChanged")); 1201 UserMetricsAction("Options_DefaultMouseLockSettingChanged"));
1212 break; 1202 break;
1213 case CONTENT_SETTINGS_TYPE_MEDIASTREAM: 1203 case CONTENT_SETTINGS_TYPE_MEDIASTREAM:
1214 content::RecordAction( 1204 content::RecordAction(
1215 UserMetricsAction("Options_DefaultMediaStreamMicSettingChanged")); 1205 UserMetricsAction("Options_DefaultMediaStreamMicSettingChanged"));
1216 break; 1206 break;
1217 default: 1207 default:
1218 break; 1208 break;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 media_settings_.flash_default_setting, 1384 media_settings_.flash_default_setting,
1395 media_settings_.flash_exceptions, 1385 media_settings_.flash_exceptions,
1396 media_settings_.policy_disable_audio, 1386 media_settings_.policy_disable_audio,
1397 media_settings_.policy_disable_video)) { 1387 media_settings_.policy_disable_video)) {
1398 ShowFlashMediaLink(EXCEPTIONS, true); 1388 ShowFlashMediaLink(EXCEPTIONS, true);
1399 } 1389 }
1400 } 1390 }
1401 } 1391 }
1402 1392
1403 } // namespace options 1393 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698