| 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 GpuProcessHost::gpu_enabled() && | 425 GpuProcessHost::gpu_enabled() && |
| 426 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); | 426 !command_line.HasSwitch(switches::kDisableAccelerated2dCanvas); |
| 427 prefs.antialiased_2d_canvas_disabled = | 427 prefs.antialiased_2d_canvas_disabled = |
| 428 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); | 428 command_line.HasSwitch(switches::kDisable2dCanvasAntialiasing); |
| 429 prefs.antialiased_clips_2d_canvas_enabled = | 429 prefs.antialiased_clips_2d_canvas_enabled = |
| 430 command_line.HasSwitch(switches::kEnable2dCanvasClipAntialiasing); | 430 command_line.HasSwitch(switches::kEnable2dCanvasClipAntialiasing); |
| 431 prefs.accelerated_2d_canvas_msaa_sample_count = | 431 prefs.accelerated_2d_canvas_msaa_sample_count = |
| 432 atoi(command_line.GetSwitchValueASCII( | 432 atoi(command_line.GetSwitchValueASCII( |
| 433 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); | 433 switches::kAcceleratedCanvas2dMSAASampleCount).c_str()); |
| 434 | 434 |
| 435 prefs.inert_visual_viewport = | |
| 436 command_line.HasSwitch(switches::kInertVisualViewport); | |
| 437 | |
| 438 prefs.pinch_overlay_scrollbar_thickness = 10; | 435 prefs.pinch_overlay_scrollbar_thickness = 10; |
| 439 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); | 436 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); |
| 440 | 437 |
| 441 #if defined(OS_ANDROID) | 438 #if defined(OS_ANDROID) |
| 442 // On Android, user gestures are normally required, unless that requirement | 439 // On Android, user gestures are normally required, unless that requirement |
| 443 // is disabled with a command-line switch or the equivalent field trial is | 440 // is disabled with a command-line switch or the equivalent field trial is |
| 444 // is set to "Enabled". | 441 // is set to "Enabled". |
| 445 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 442 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
| 446 "MediaElementAutoplay"); | 443 "MediaElementAutoplay"); |
| 447 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 444 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
| (...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1462 } else { | 1459 } else { |
| 1463 render_view_ready_on_process_launch_ = true; | 1460 render_view_ready_on_process_launch_ = true; |
| 1464 } | 1461 } |
| 1465 } | 1462 } |
| 1466 | 1463 |
| 1467 void RenderViewHostImpl::RenderViewReady() { | 1464 void RenderViewHostImpl::RenderViewReady() { |
| 1468 delegate_->RenderViewReady(this); | 1465 delegate_->RenderViewReady(this); |
| 1469 } | 1466 } |
| 1470 | 1467 |
| 1471 } // namespace content | 1468 } // namespace content |
| OLD | NEW |