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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 prefs.accelerated_2d_canvas_msaa_sample_count = | 468 prefs.accelerated_2d_canvas_msaa_sample_count = |
469 atoi(command_line.GetSwitchValueASCII( | 469 atoi(command_line.GetSwitchValueASCII( |
470 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); | 470 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); |
471 | 471 |
472 prefs.inert_visual_viewport = | 472 prefs.inert_visual_viewport = |
473 command_line.HasSwitch(switches::kInertVisualViewport); | 473 command_line.HasSwitch(switches::kInertVisualViewport); |
474 | 474 |
475 prefs.pinch_overlay_scrollbar_thickness = 10; | 475 prefs.pinch_overlay_scrollbar_thickness = 10; |
476 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); | 476 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); |
477 | 477 |
| 478 prefs.history_entry_requires_user_gesture = |
| 479 command_line.HasSwitch(switches::kHistoryEntryRequiresUserGesture); |
| 480 |
478 #if defined(OS_ANDROID) | 481 #if defined(OS_ANDROID) |
479 // On Android, user gestures are normally required, unless that requirement | 482 // On Android, user gestures are normally required, unless that requirement |
480 // is disabled with a command-line switch or the equivalent field trial is | 483 // is disabled with a command-line switch or the equivalent field trial is |
481 // is set to "Enabled". | 484 // is set to "Enabled". |
482 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 485 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
483 "MediaElementAutoplay"); | 486 "MediaElementAutoplay"); |
484 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 487 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
485 switches::kDisableGestureRequirementForMediaPlayback) && | 488 switches::kDisableGestureRequirementForMediaPlayback) && |
486 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); | 489 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); |
487 prefs.autoplay_muted_videos_enabled = | 490 prefs.autoplay_muted_videos_enabled = |
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 // Note: We are using the origin URL provided by the sender here. It may be | 1321 // Note: We are using the origin URL provided by the sender here. It may be |
1319 // different from the receiver's. | 1322 // different from the receiver's. |
1320 file_system_file.url = | 1323 file_system_file.url = |
1321 GURL(storage::GetIsolatedFileSystemRootURIString( | 1324 GURL(storage::GetIsolatedFileSystemRootURIString( |
1322 file_system_url.origin(), filesystem_id, std::string()) | 1325 file_system_url.origin(), filesystem_id, std::string()) |
1323 .append(register_name)); | 1326 .append(register_name)); |
1324 } | 1327 } |
1325 } | 1328 } |
1326 | 1329 |
1327 } // namespace content | 1330 } // namespace content |
OLD | NEW |