| OLD | NEW |
| 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 "content/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 475 |
| 476 #if defined(OS_ANDROID) | 476 #if defined(OS_ANDROID) |
| 477 // On Android, user gestures are normally required, unless that requirement | 477 // On Android, user gestures are normally required, unless that requirement |
| 478 // is disabled with a command-line switch or the equivalent field trial is | 478 // is disabled with a command-line switch or the equivalent field trial is |
| 479 // is set to "Enabled". | 479 // is set to "Enabled". |
| 480 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 480 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
| 481 "MediaElementAutoplay"); | 481 "MediaElementAutoplay"); |
| 482 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 482 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
| 483 switches::kDisableGestureRequirementForMediaPlayback) && | 483 switches::kDisableGestureRequirementForMediaPlayback) && |
| 484 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); | 484 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); |
| 485 prefs.autoplay_muted_videos_enabled = | |
| 486 base::FeatureList::IsEnabled(features::kAutoplayMutedVideos); | |
| 487 | 485 |
| 488 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); | 486 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); |
| 489 | 487 |
| 490 prefs.use_solid_color_scrollbars = true; | 488 prefs.use_solid_color_scrollbars = true; |
| 491 #endif | 489 #endif |
| 492 | 490 |
| 493 // Handle autoplay gesture override experiment. | 491 // Handle autoplay gesture override experiment. |
| 494 // Note that anything but a well-formed string turns the experiment off. | 492 // Note that anything but a well-formed string turns the experiment off. |
| 495 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( | 493 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( |
| 496 "MediaElementGestureOverrideExperiment"); | 494 "MediaElementGestureOverrideExperiment"); |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1322 // Note: We are using the origin URL provided by the sender here. It may be | 1320 // Note: We are using the origin URL provided by the sender here. It may be |
| 1323 // different from the receiver's. | 1321 // different from the receiver's. |
| 1324 file_system_file.url = | 1322 file_system_file.url = |
| 1325 GURL(storage::GetIsolatedFileSystemRootURIString( | 1323 GURL(storage::GetIsolatedFileSystemRootURIString( |
| 1326 file_system_url.origin(), filesystem_id, std::string()) | 1324 file_system_url.origin(), filesystem_id, std::string()) |
| 1327 .append(register_name)); | 1325 .append(register_name)); |
| 1328 } | 1326 } |
| 1329 } | 1327 } |
| 1330 | 1328 |
| 1331 } // namespace content | 1329 } // namespace content |
| OLD | NEW |