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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings.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/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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 } 660 }
661 ui_->SetSelectedTab(tab_id); 661 ui_->SetSelectedTab(tab_id);
662 } 662 }
663 663
664 void WebsiteSettings::PresentSitePermissions() { 664 void WebsiteSettings::PresentSitePermissions() {
665 PermissionInfoList permission_info_list; 665 PermissionInfoList permission_info_list;
666 666
667 WebsiteSettingsUI::PermissionInfo permission_info; 667 WebsiteSettingsUI::PermissionInfo permission_info;
668 for (size_t i = 0; i < arraysize(kPermissionType); ++i) { 668 for (size_t i = 0; i < arraysize(kPermissionType); ++i) {
669 permission_info.type = kPermissionType[i]; 669 permission_info.type = kPermissionType[i];
670 if (permission_info.type == CONTENT_SETTINGS_TYPE_MIDI_SYSEX) {
671 const base::CommandLine* command_line =
672 base::CommandLine::ForCurrentProcess();
673 if (!command_line->HasSwitch(switches::kEnableWebMIDI))
674 continue;
675 }
676 670
677 content_settings::SettingInfo info; 671 content_settings::SettingInfo info;
678 scoped_ptr<base::Value> value = 672 scoped_ptr<base::Value> value =
679 content_settings_->GetWebsiteSettingWithoutOverride( 673 content_settings_->GetWebsiteSettingWithoutOverride(
680 site_url_, site_url_, permission_info.type, std::string(), &info); 674 site_url_, site_url_, permission_info.type, std::string(), &info);
681 DCHECK(value.get()); 675 DCHECK(value.get());
682 if (value->GetType() == base::Value::TYPE_INTEGER) { 676 if (value->GetType() == base::Value::TYPE_INTEGER) {
683 permission_info.setting = 677 permission_info.setting =
684 content_settings::ValueToContentSetting(value.get()); 678 content_settings::ValueToContentSetting(value.get());
685 } else { 679 } else {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 if (visited_before_today) { 771 if (visited_before_today) {
778 first_visit_text = l10n_util::GetStringFUTF16( 772 first_visit_text = l10n_util::GetStringFUTF16(
779 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY, 773 IDS_PAGE_INFO_SECURITY_TAB_VISITED_BEFORE_TODAY,
780 base::TimeFormatShortDate(first_visit)); 774 base::TimeFormatShortDate(first_visit));
781 } else { 775 } else {
782 first_visit_text = l10n_util::GetStringUTF16( 776 first_visit_text = l10n_util::GetStringUTF16(
783 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY); 777 IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY);
784 } 778 }
785 ui_->SetFirstVisit(first_visit_text); 779 ui_->SetFirstVisit(first_visit_text);
786 } 780 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/content_settings.js ('k') | chrome/browser/ui/webui/options/content_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698