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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1906533002: Add 'autoplay' content settings and expose it to Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/common/render_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 return kMaxFSM; 649 return kMaxFSM;
650 650
651 // The font scale multiplier varies linearly between kMinFSM and kMaxFSM. 651 // The font scale multiplier varies linearly between kMinFSM and kMaxFSM.
652 float ratio = static_cast<float>(minWidth - kWidthForMinFSM) / 652 float ratio = static_cast<float>(minWidth - kWidthForMinFSM) /
653 (kWidthForMaxFSM - kWidthForMinFSM); 653 (kWidthForMaxFSM - kWidthForMinFSM);
654 return ratio * (kMaxFSM - kMinFSM) + kMinFSM; 654 return ratio * (kMaxFSM - kMinFSM) + kMinFSM;
655 } 655 }
656 #endif // defined(OS_ANDROID) 656 #endif // defined(OS_ANDROID)
657 657
658 #if defined(ENABLE_EXTENSIONS) 658 #if defined(ENABLE_EXTENSIONS)
659 // By default, JavaScript and images are enabled in guest content. 659 // By default, JavaScript and images are enabled in guest content.
Bernhard Bauer 2016/04/20 16:08:53 Update the comment.
mlamouri (slow - plz ping) 2016/04/20 18:36:47 Done.
660 void GetGuestViewDefaultContentSettingRules( 660 void GetGuestViewDefaultContentSettingRules(
661 bool incognito, 661 bool incognito,
662 RendererContentSettingRules* rules) { 662 RendererContentSettingRules* rules) {
663 rules->image_rules.push_back( 663 rules->image_rules.push_back(
664 ContentSettingPatternSource(ContentSettingsPattern::Wildcard(), 664 ContentSettingPatternSource(ContentSettingsPattern::Wildcard(),
665 ContentSettingsPattern::Wildcard(), 665 ContentSettingsPattern::Wildcard(),
666 CONTENT_SETTING_ALLOW, 666 CONTENT_SETTING_ALLOW,
667 std::string(), 667 std::string(),
668 incognito)); 668 incognito));
669 669
670 rules->script_rules.push_back( 670 rules->script_rules.push_back(
671 ContentSettingPatternSource(ContentSettingsPattern::Wildcard(), 671 ContentSettingPatternSource(ContentSettingsPattern::Wildcard(),
672 ContentSettingsPattern::Wildcard(), 672 ContentSettingsPattern::Wildcard(),
673 CONTENT_SETTING_ALLOW, 673 CONTENT_SETTING_ALLOW,
674 std::string(), 674 std::string(),
675 incognito)); 675 incognito));
676 rules->autoplay_rules.push_back(
677 ContentSettingPatternSource(ContentSettingsPattern::Wildcard(),
678 ContentSettingsPattern::Wildcard(),
679 CONTENT_SETTING_ALLOW,
680 std::string(),
681 incognito));
676 } 682 }
677 #endif // defined(ENABLE_EXTENSIONS) 683 #endif // defined(ENABLE_EXTENSIONS)
678 684
679 void CreateUsbDeviceManager( 685 void CreateUsbDeviceManager(
680 RenderFrameHost* render_frame_host, 686 RenderFrameHost* render_frame_host,
681 mojo::InterfaceRequest<device::usb::DeviceManager> request) { 687 mojo::InterfaceRequest<device::usb::DeviceManager> request) {
682 WebContents* web_contents = 688 WebContents* web_contents =
683 WebContents::FromRenderFrameHost(render_frame_host); 689 WebContents::FromRenderFrameHost(render_frame_host);
684 if (!web_contents) { 690 if (!web_contents) {
685 NOTREACHED(); 691 NOTREACHED();
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 if (channel <= kMaxDisableEncryptionChannel) { 2966 if (channel <= kMaxDisableEncryptionChannel) {
2961 static const char* const kWebRtcDevSwitchNames[] = { 2967 static const char* const kWebRtcDevSwitchNames[] = {
2962 switches::kDisableWebRtcEncryption, 2968 switches::kDisableWebRtcEncryption,
2963 }; 2969 };
2964 to_command_line->CopySwitchesFrom(from_command_line, 2970 to_command_line->CopySwitchesFrom(from_command_line,
2965 kWebRtcDevSwitchNames, 2971 kWebRtcDevSwitchNames,
2966 arraysize(kWebRtcDevSwitchNames)); 2972 arraysize(kWebRtcDevSwitchNames));
2967 } 2973 }
2968 } 2974 }
2969 #endif // defined(ENABLE_WEBRTC) 2975 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « no previous file | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698