| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 prefs.accelerated_2d_canvas_enabled = | 424 prefs.accelerated_2d_canvas_enabled = |
| 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 // Text blobs rely on impl-side painting for proper LCD handling. | 434 prefs.text_blobs_enabled = |
| 435 prefs.text_blobs_enabled = command_line.HasSwitch(switches::kForceTextBlobs) | 435 command_line.HasSwitch(switches::kForceTextBlobs) || |
| 436 || (content::IsImplSidePaintingEnabled() && | 436 !command_line.HasSwitch(switches::kDisableTextBlobs); |
| 437 !command_line.HasSwitch(switches::kDisableTextBlobs)); | |
| 438 | 437 |
| 439 prefs.pinch_overlay_scrollbar_thickness = 10; | 438 prefs.pinch_overlay_scrollbar_thickness = 10; |
| 440 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); | 439 prefs.use_solid_color_scrollbars = ui::IsOverlayScrollbarEnabled(); |
| 441 prefs.invert_viewport_scroll_order = | 440 prefs.invert_viewport_scroll_order = |
| 442 command_line.HasSwitch(switches::kInvertViewportScrollOrder); | 441 command_line.HasSwitch(switches::kInvertViewportScrollOrder); |
| 443 | 442 |
| 444 #if defined(OS_ANDROID) | 443 #if defined(OS_ANDROID) |
| 445 // On Android, user gestures are normally required, unless that requirement | 444 // On Android, user gestures are normally required, unless that requirement |
| 446 // is disabled with a command-line switch or the equivalent field trial is | 445 // is disabled with a command-line switch or the equivalent field trial is |
| 447 // is set to "Enabled". | 446 // is set to "Enabled". |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 prefs.viewport_meta_enabled = | 500 prefs.viewport_meta_enabled = |
| 502 command_line.HasSwitch(switches::kEnableViewportMeta); | 501 command_line.HasSwitch(switches::kEnableViewportMeta); |
| 503 | 502 |
| 504 prefs.viewport_enabled = | 503 prefs.viewport_enabled = |
| 505 command_line.HasSwitch(switches::kEnableViewport) || | 504 command_line.HasSwitch(switches::kEnableViewport) || |
| 506 prefs.viewport_meta_enabled; | 505 prefs.viewport_meta_enabled; |
| 507 | 506 |
| 508 prefs.main_frame_resizes_are_orientation_changes = | 507 prefs.main_frame_resizes_are_orientation_changes = |
| 509 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); | 508 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); |
| 510 | 509 |
| 511 prefs.deferred_image_decoding_enabled = | |
| 512 command_line.HasSwitch(switches::kEnableDeferredImageDecoding) || | |
| 513 content::IsImplSidePaintingEnabled(); | |
| 514 | |
| 515 prefs.image_color_profiles_enabled = | 510 prefs.image_color_profiles_enabled = |
| 516 command_line.HasSwitch(switches::kEnableImageColorProfiles); | 511 command_line.HasSwitch(switches::kEnableImageColorProfiles); |
| 517 | 512 |
| 518 prefs.spatial_navigation_enabled = command_line.HasSwitch( | 513 prefs.spatial_navigation_enabled = command_line.HasSwitch( |
| 519 switches::kEnableSpatialNavigation); | 514 switches::kEnableSpatialNavigation); |
| 520 | 515 |
| 521 prefs.disable_reading_from_canvas = command_line.HasSwitch( | 516 prefs.disable_reading_from_canvas = command_line.HasSwitch( |
| 522 switches::kDisableReadingFromCanvas); | 517 switches::kDisableReadingFromCanvas); |
| 523 | 518 |
| 524 prefs.strict_mixed_content_checking = command_line.HasSwitch( | 519 prefs.strict_mixed_content_checking = command_line.HasSwitch( |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1428 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
| 1434 policy->GrantReadFile(GetProcess()->GetID(), file); | 1429 policy->GrantReadFile(GetProcess()->GetID(), file); |
| 1435 } | 1430 } |
| 1436 } | 1431 } |
| 1437 | 1432 |
| 1438 void RenderViewHostImpl::SelectWordAroundCaret() { | 1433 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1439 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1434 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1440 } | 1435 } |
| 1441 | 1436 |
| 1442 } // namespace content | 1437 } // namespace content |
| OLD | NEW |