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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 prefs.antialiased_clips_2d_canvas_enabled = | 459 prefs.antialiased_clips_2d_canvas_enabled = |
460 !command_line.HasSwitch(switches::kDisable2dCanvasClipAntialiasing); | 460 !command_line.HasSwitch(switches::kDisable2dCanvasClipAntialiasing); |
461 prefs.accelerated_2d_canvas_msaa_sample_count = | 461 prefs.accelerated_2d_canvas_msaa_sample_count = |
462 atoi(command_line.GetSwitchValueASCII( | 462 atoi(command_line.GetSwitchValueASCII( |
463 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); | 463 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); |
464 | 464 |
465 prefs.inert_visual_viewport = | 465 prefs.inert_visual_viewport = |
466 command_line.HasSwitch(switches::kInertVisualViewport); | 466 command_line.HasSwitch(switches::kInertVisualViewport); |
467 | 467 |
468 prefs.pinch_overlay_scrollbar_thickness = 10; | 468 prefs.pinch_overlay_scrollbar_thickness = 10; |
469 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); | 469 prefs.use_solid_color_scrollbars = false; |
470 | 470 |
471 prefs.history_entry_requires_user_gesture = | 471 prefs.history_entry_requires_user_gesture = |
472 command_line.HasSwitch(switches::kHistoryEntryRequiresUserGesture); | 472 command_line.HasSwitch(switches::kHistoryEntryRequiresUserGesture); |
473 | 473 |
474 #if defined(OS_ANDROID) | 474 #if defined(OS_ANDROID) |
475 // On Android, user gestures are normally required, unless that requirement | 475 // On Android, user gestures are normally required, unless that requirement |
476 // is disabled with a command-line switch or the equivalent field trial is | 476 // is disabled with a command-line switch or the equivalent field trial is |
477 // is set to "Enabled". | 477 // is set to "Enabled". |
478 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 478 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
479 "MediaElementAutoplay"); | 479 "MediaElementAutoplay"); |
480 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 480 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
481 switches::kDisableGestureRequirementForMediaPlayback) && | 481 switches::kDisableGestureRequirementForMediaPlayback) && |
482 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); | 482 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); |
483 prefs.autoplay_muted_videos_enabled = | 483 prefs.autoplay_muted_videos_enabled = |
484 base::FeatureList::IsEnabled(features::kAutoplayMutedVideos); | 484 base::FeatureList::IsEnabled(features::kAutoplayMutedVideos); |
485 | 485 |
486 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); | 486 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); |
| 487 |
| 488 prefs.use_solid_color_scrollbars = true; |
487 #endif | 489 #endif |
488 | 490 |
489 // Handle autoplay gesture override experiment. | 491 // Handle autoplay gesture override experiment. |
490 // 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. |
491 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( | 493 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( |
492 "MediaElementGestureOverrideExperiment"); | 494 "MediaElementGestureOverrideExperiment"); |
493 | 495 |
494 prefs.touch_enabled = ui::AreTouchEventsEnabled(); | 496 prefs.touch_enabled = ui::AreTouchEventsEnabled(); |
495 prefs.device_supports_touch = prefs.touch_enabled && | 497 prefs.device_supports_touch = prefs.touch_enabled && |
496 ui::GetTouchScreensAvailability() == | 498 ui::GetTouchScreensAvailability() == |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 // Note: We are using the origin URL provided by the sender here. It may be | 1316 // Note: We are using the origin URL provided by the sender here. It may be |
1315 // different from the receiver's. | 1317 // different from the receiver's. |
1316 file_system_file.url = | 1318 file_system_file.url = |
1317 GURL(storage::GetIsolatedFileSystemRootURIString( | 1319 GURL(storage::GetIsolatedFileSystemRootURIString( |
1318 file_system_url.origin(), filesystem_id, std::string()) | 1320 file_system_url.origin(), filesystem_id, std::string()) |
1319 .append(register_name)); | 1321 .append(register_name)); |
1320 } | 1322 } |
1321 } | 1323 } |
1322 | 1324 |
1323 } // namespace content | 1325 } // namespace content |
OLD | NEW |