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

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

Issue 1011833002: Web MIDI: make Chrome a music platform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/webui/options/content_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 979
980 base::StringValue type_string( 980 base::StringValue type_string(
981 ContentSettingsTypeToGroupName(CONTENT_SETTINGS_TYPE_MEDIASTREAM)); 981 ContentSettingsTypeToGroupName(CONTENT_SETTINGS_TYPE_MEDIASTREAM));
982 web_ui()->CallJavascriptFunction("ContentSettings.setExceptions", 982 web_ui()->CallJavascriptFunction("ContentSettings.setExceptions",
983 type_string, media_exceptions); 983 type_string, media_exceptions);
984 984
985 UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_MEDIASTREAM); 985 UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_MEDIASTREAM);
986 } 986 }
987 987
988 void ContentSettingsHandler::UpdateMIDISysExExceptionsView() { 988 void ContentSettingsHandler::UpdateMIDISysExExceptionsView() {
989 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
990 switches::kEnableWebMIDI)) {
991 web_ui()->CallJavascriptFunction(
992 "ContentSettings.showExperimentalWebMIDISettings",
993 base::FundamentalValue(true));
994 }
995
996 UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_MIDI_SYSEX); 989 UpdateSettingDefaultFromModel(CONTENT_SETTINGS_TYPE_MIDI_SYSEX);
997 UpdateExceptionsViewFromHostContentSettingsMap( 990 UpdateExceptionsViewFromHostContentSettingsMap(
998 CONTENT_SETTINGS_TYPE_MIDI_SYSEX); 991 CONTENT_SETTINGS_TYPE_MIDI_SYSEX);
999 } 992 }
1000 993
1001 void ContentSettingsHandler::AdjustZoomLevelsListForSigninPageIfNecessary( 994 void ContentSettingsHandler::AdjustZoomLevelsListForSigninPageIfNecessary(
1002 content::HostZoomMap::ZoomLevelVector* zoom_levels) { 995 content::HostZoomMap::ZoomLevelVector* zoom_levels) {
1003 if (switches::IsEnableWebviewBasedSignin()) 996 if (switches::IsEnableWebviewBasedSignin())
1004 return; 997 return;
1005 998
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1602 1595
1603 // Exceptions apply only when the feature is enabled. 1596 // Exceptions apply only when the feature is enabled.
1604 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); 1597 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
1605 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1598 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1606 web_ui()->CallJavascriptFunction( 1599 web_ui()->CallJavascriptFunction(
1607 "ContentSettings.enableProtectedContentExceptions", 1600 "ContentSettings.enableProtectedContentExceptions",
1608 base::FundamentalValue(enable_exceptions)); 1601 base::FundamentalValue(enable_exceptions));
1609 } 1602 }
1610 1603
1611 } // namespace options 1604 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698