| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 | 721 |
| 722 WebSettings::SelectionStrategyType selection_strategy = | 722 WebSettings::SelectionStrategyType selection_strategy = |
| 723 WebSettings::SelectionStrategyType::Character; | 723 WebSettings::SelectionStrategyType::Character; |
| 724 const std::string selection_strategy_str = | 724 const std::string selection_strategy_str = |
| 725 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | 725 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 726 switches::kTouchTextSelectionStrategy); | 726 switches::kTouchTextSelectionStrategy); |
| 727 if (selection_strategy_str == "direction") | 727 if (selection_strategy_str == "direction") |
| 728 selection_strategy = WebSettings::SelectionStrategyType::Direction; | 728 selection_strategy = WebSettings::SelectionStrategyType::Direction; |
| 729 webview()->settings()->setSelectionStrategy(selection_strategy); | 729 webview()->settings()->setSelectionStrategy(selection_strategy); |
| 730 | 730 |
| 731 std::string passiveListenersDefault = |
| 732 command_line.GetSwitchValueASCII(switches::kPassiveListenersDefault); |
| 733 if (!passiveListenersDefault.empty()) { |
| 734 WebSettings::PassiveEventListenerDefault passiveDefault = |
| 735 WebSettings::PassiveEventListenerDefault::False; |
| 736 if (passiveListenersDefault == "documentonlytrue") |
| 737 passiveDefault = WebSettings::PassiveEventListenerDefault::DocumentTrue; |
| 738 else if (passiveListenersDefault == "true") |
| 739 passiveDefault = WebSettings::PassiveEventListenerDefault::True; |
| 740 else if (passiveListenersDefault == "forcealltrue") |
| 741 passiveDefault = WebSettings::PassiveEventListenerDefault::ForceAllTrue; |
| 742 webview()->settings()->setPassiveEventListenerDefault(passiveDefault); |
| 743 } |
| 744 |
| 731 ApplyBlinkSettings(command_line, webview()->settings()); | 745 ApplyBlinkSettings(command_line, webview()->settings()); |
| 732 | 746 |
| 733 if (params.main_frame_routing_id != MSG_ROUTING_NONE) { | 747 if (params.main_frame_routing_id != MSG_ROUTING_NONE) { |
| 734 main_render_frame_ = RenderFrameImpl::CreateMainFrame( | 748 main_render_frame_ = RenderFrameImpl::CreateMainFrame( |
| 735 this, params.main_frame_routing_id, params.main_frame_widget_routing_id, | 749 this, params.main_frame_routing_id, params.main_frame_widget_routing_id, |
| 736 params.hidden, screen_info(), compositor_deps_, opener_frame); | 750 params.hidden, screen_info(), compositor_deps_, opener_frame); |
| 737 } | 751 } |
| 738 | 752 |
| 739 if (params.proxy_routing_id != MSG_ROUTING_NONE) { | 753 if (params.proxy_routing_id != MSG_ROUTING_NONE) { |
| 740 CHECK(params.swapped_out); | 754 CHECK(params.swapped_out); |
| (...skipping 2709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3450 if (IsUseZoomForDSFEnabled()) { | 3464 if (IsUseZoomForDSFEnabled()) { |
| 3451 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3465 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3452 } else { | 3466 } else { |
| 3453 webview()->setDeviceScaleFactor(device_scale_factor_); | 3467 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3454 } | 3468 } |
| 3455 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3469 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3456 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3470 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3457 } | 3471 } |
| 3458 | 3472 |
| 3459 } // namespace content | 3473 } // namespace content |
| OLD | NEW |