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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 prefs.text_blobs_enabled = command_line.HasSwitch(switches::kForceTextBlobs) | 394 prefs.text_blobs_enabled = command_line.HasSwitch(switches::kForceTextBlobs) |
395 || (content::IsImplSidePaintingEnabled() && | 395 || (content::IsImplSidePaintingEnabled() && |
396 !command_line.HasSwitch(switches::kDisableTextBlobs)); | 396 !command_line.HasSwitch(switches::kDisableTextBlobs)); |
397 prefs.region_based_columns_enabled = | 397 prefs.region_based_columns_enabled = |
398 command_line.HasSwitch(switches::kEnableRegionBasedColumns); | 398 command_line.HasSwitch(switches::kEnableRegionBasedColumns); |
399 | 399 |
400 if (IsPinchVirtualViewportEnabled()) { | 400 if (IsPinchVirtualViewportEnabled()) { |
401 prefs.pinch_virtual_viewport_enabled = true; | 401 prefs.pinch_virtual_viewport_enabled = true; |
402 prefs.pinch_overlay_scrollbar_thickness = 10; | 402 prefs.pinch_overlay_scrollbar_thickness = 10; |
403 } | 403 } |
404 #if defined(OS_MACOSX) | |
405 // This preference has the effect of disabling Blink's elastic overscroll, | |
406 // and may be removed when Blink's elastic overscroll implementation is | |
407 // removed. | |
408 // http://crbug.com/138003 | |
409 prefs.rubber_banding_on_compositor_thread = | |
410 !command_line.HasSwitch(switches::kDisableThreadedEventHandlingMac); | |
411 #endif | |
412 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); | 404 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); |
413 | 405 |
414 #if defined(OS_ANDROID) | 406 #if defined(OS_ANDROID) |
415 // On Android, user gestures are normally required, unless that requirement | 407 // On Android, user gestures are normally required, unless that requirement |
416 // is disabled with a command-line switch or the equivalent field trial is | 408 // is disabled with a command-line switch or the equivalent field trial is |
417 // is set to "Enabled". | 409 // is set to "Enabled". |
418 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 410 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
419 "MediaElementAutoplay"); | 411 "MediaElementAutoplay"); |
420 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 412 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
421 switches::kDisableGestureRequirementForMediaPlayback) && | 413 switches::kDisableGestureRequirementForMediaPlayback) && |
(...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1401 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1410 | 1402 |
1411 frame_tree->ResetForMainFrameSwap(); | 1403 frame_tree->ResetForMainFrameSwap(); |
1412 } | 1404 } |
1413 | 1405 |
1414 void RenderViewHostImpl::SelectWordAroundCaret() { | 1406 void RenderViewHostImpl::SelectWordAroundCaret() { |
1415 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1407 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1416 } | 1408 } |
1417 | 1409 |
1418 } // namespace content | 1410 } // namespace content |
OLD | NEW |