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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 GpuProcessHost::gpu_enabled() && | 435 GpuProcessHost::gpu_enabled() && |
436 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 436 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
437 prefs.antialiased_2d_canvas_disabled = | 437 prefs.antialiased_2d_canvas_disabled = |
438 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); | 438 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); |
439 prefs.antialiased_clips_2d_canvas_enabled = | 439 prefs.antialiased_clips_2d_canvas_enabled = |
440 command_line.HasSwitch(switches::kEnable2dCanvasClipAntialiasing); | 440 command_line.HasSwitch(switches::kEnable2dCanvasClipAntialiasing); |
441 prefs.accelerated_2d_canvas_msaa_sample_count = | 441 prefs.accelerated_2d_canvas_msaa_sample_count = |
442 atoi(command_line.GetSwitchValueASCII( | 442 atoi(command_line.GetSwitchValueASCII( |
443 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); | 443 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); |
444 | 444 |
| 445 prefs.inert_visual_viewport = |
| 446 command_line.HasSwitch(switches::kInertVisualViewport); |
| 447 |
445 prefs.pinch_overlay_scrollbar_thickness = 10; | 448 prefs.pinch_overlay_scrollbar_thickness = 10; |
446 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); | 449 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); |
447 | 450 |
448 #if defined(OS_ANDROID) | 451 #if defined(OS_ANDROID) |
449 // On Android, user gestures are normally required, unless that requirement | 452 // On Android, user gestures are normally required, unless that requirement |
450 // is disabled with a command-line switch or the equivalent field trial is | 453 // is disabled with a command-line switch or the equivalent field trial is |
451 // is set to "Enabled". | 454 // is set to "Enabled". |
452 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 455 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
453 "MediaElementAutoplay"); | 456 "MediaElementAutoplay"); |
454 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 457 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1438 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1441 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
1439 policy->GrantReadFile(GetProcess()->GetID(), file); | 1442 policy->GrantReadFile(GetProcess()->GetID(), file); |
1440 } | 1443 } |
1441 } | 1444 } |
1442 | 1445 |
1443 void RenderViewHostImpl::SelectWordAroundCaret() { | 1446 void RenderViewHostImpl::SelectWordAroundCaret() { |
1444 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1447 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1445 } | 1448 } |
1446 | 1449 |
1447 } // namespace content | 1450 } // namespace content |
OLD | NEW |