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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 prefs.accelerated_2d_canvas_msaa_sample_count = | 432 prefs.accelerated_2d_canvas_msaa_sample_count = |
433 atoi(command_line.GetSwitchValueASCII( | 433 atoi(command_line.GetSwitchValueASCII( |
434 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); | 434 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); |
435 // Text blobs rely on impl-side painting for proper LCD handling. | 435 // Text blobs rely on impl-side painting for proper LCD handling. |
436 prefs.text_blobs_enabled = command_line.HasSwitch(switches::kForceTextBlobs) | 436 prefs.text_blobs_enabled = command_line.HasSwitch(switches::kForceTextBlobs) |
437 || (content::IsImplSidePaintingEnabled() && | 437 || (content::IsImplSidePaintingEnabled() && |
438 !command_line.HasSwitch(switches::kDisableTextBlobs)); | 438 !command_line.HasSwitch(switches::kDisableTextBlobs)); |
439 | 439 |
440 prefs.pinch_overlay_scrollbar_thickness = 10; | 440 prefs.pinch_overlay_scrollbar_thickness = 10; |
441 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); | 441 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); |
| 442 prefs.viewport_scroll_order_experiment = |
| 443 command_line.HasSwitch(switches::kEnableViewportScrollOrderExperiment); |
442 | 444 |
443 #if defined(OS_ANDROID) | 445 #if defined(OS_ANDROID) |
444 // On Android, user gestures are normally required, unless that requirement | 446 // On Android, user gestures are normally required, unless that requirement |
445 // is disabled with a command-line switch or the equivalent field trial is | 447 // is disabled with a command-line switch or the equivalent field trial is |
446 // is set to "Enabled". | 448 // is set to "Enabled". |
447 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 449 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
448 "MediaElementAutoplay"); | 450 "MediaElementAutoplay"); |
449 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 451 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
450 switches::kDisableGestureRequirementForMediaPlayback) && | 452 switches::kDisableGestureRequirementForMediaPlayback) && |
451 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); | 453 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1434 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
1433 policy->GrantReadFile(GetProcess()->GetID(), file); | 1435 policy->GrantReadFile(GetProcess()->GetID(), file); |
1434 } | 1436 } |
1435 } | 1437 } |
1436 | 1438 |
1437 void RenderViewHostImpl::SelectWordAroundCaret() { | 1439 void RenderViewHostImpl::SelectWordAroundCaret() { |
1438 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1440 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1439 } | 1441 } |
1440 | 1442 |
1441 } // namespace content | 1443 } // namespace content |
OLD | NEW |