| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 prefs.antialiased_clips_2d_canvas_enabled = | 469 prefs.antialiased_clips_2d_canvas_enabled = |
| 470 !command_line.HasSwitch(switches::kDisable2dCanvasClipAntialiasing); | 470 !command_line.HasSwitch(switches::kDisable2dCanvasClipAntialiasing); |
| 471 prefs.accelerated_2d_canvas_msaa_sample_count = | 471 prefs.accelerated_2d_canvas_msaa_sample_count = |
| 472 atoi(command_line.GetSwitchValueASCII( | 472 atoi(command_line.GetSwitchValueASCII( |
| 473 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); | 473 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); |
| 474 | 474 |
| 475 prefs.inert_visual_viewport = | 475 prefs.inert_visual_viewport = |
| 476 command_line.HasSwitch(switches::kInertVisualViewport); | 476 command_line.HasSwitch(switches::kInertVisualViewport); |
| 477 | 477 |
| 478 prefs.pinch_overlay_scrollbar_thickness = 10; | 478 prefs.pinch_overlay_scrollbar_thickness = 10; |
| 479 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); | 479 prefs.use_solid_color_scrollbars = false; |
| 480 | 480 |
| 481 prefs.history_entry_requires_user_gesture = | 481 prefs.history_entry_requires_user_gesture = |
| 482 command_line.HasSwitch(switches::kHistoryEntryRequiresUserGesture); | 482 command_line.HasSwitch(switches::kHistoryEntryRequiresUserGesture); |
| 483 | 483 |
| 484 #if defined(OS_ANDROID) | 484 #if defined(OS_ANDROID) |
| 485 // On Android, user gestures are normally required, unless that requirement | 485 // On Android, user gestures are normally required, unless that requirement |
| 486 // is disabled with a command-line switch or the equivalent field trial is | 486 // is disabled with a command-line switch or the equivalent field trial is |
| 487 // is set to "Enabled". | 487 // is set to "Enabled". |
| 488 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 488 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
| 489 "MediaElementAutoplay"); | 489 "MediaElementAutoplay"); |
| 490 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 490 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
| 491 switches::kDisableGestureRequirementForMediaPlayback) && | 491 switches::kDisableGestureRequirementForMediaPlayback) && |
| 492 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); | 492 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); |
| 493 prefs.autoplay_muted_videos_enabled = | 493 prefs.autoplay_muted_videos_enabled = |
| 494 base::FeatureList::IsEnabled(features::kAutoplayMutedVideos); | 494 base::FeatureList::IsEnabled(features::kAutoplayMutedVideos); |
| 495 | 495 |
| 496 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); | 496 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); |
| 497 |
| 498 prefs.use_solid_color_scrollbars = true; |
| 497 #endif | 499 #endif |
| 498 | 500 |
| 499 // Handle autoplay gesture override experiment. | 501 // Handle autoplay gesture override experiment. |
| 500 // Note that anything but a well-formed string turns the experiment off. | 502 // Note that anything but a well-formed string turns the experiment off. |
| 501 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( | 503 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( |
| 502 "MediaElementGestureOverrideExperiment"); | 504 "MediaElementGestureOverrideExperiment"); |
| 503 | 505 |
| 504 prefs.touch_enabled = ui::AreTouchEventsEnabled(); | 506 prefs.touch_enabled = ui::AreTouchEventsEnabled(); |
| 505 prefs.device_supports_touch = prefs.touch_enabled && | 507 prefs.device_supports_touch = prefs.touch_enabled && |
| 506 ui::GetTouchScreensAvailability() == | 508 ui::GetTouchScreensAvailability() == |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1331 // Note: We are using the origin URL provided by the sender here. It may be | 1333 // Note: We are using the origin URL provided by the sender here. It may be |
| 1332 // different from the receiver's. | 1334 // different from the receiver's. |
| 1333 file_system_file.url = | 1335 file_system_file.url = |
| 1334 GURL(storage::GetIsolatedFileSystemRootURIString( | 1336 GURL(storage::GetIsolatedFileSystemRootURIString( |
| 1335 file_system_url.origin(), filesystem_id, std::string()) | 1337 file_system_url.origin(), filesystem_id, std::string()) |
| 1336 .append(register_name)); | 1338 .append(register_name)); |
| 1337 } | 1339 } |
| 1338 } | 1340 } |
| 1339 | 1341 |
| 1340 } // namespace content | 1342 } // namespace content |
| OLD | NEW |