Chromium Code Reviews| 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 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 754 webview()->setMainFrame(main_render_frame_->GetWebFrame()); | 754 webview()->setMainFrame(main_render_frame_->GetWebFrame()); |
| 755 } | 755 } |
| 756 main_render_frame_->Initialize(); | 756 main_render_frame_->Initialize(); |
| 757 | 757 |
| 758 if (switches::IsTouchDragDropEnabled()) | 758 if (switches::IsTouchDragDropEnabled()) |
| 759 webview()->settings()->setTouchDragDropEnabled(true); | 759 webview()->settings()->setTouchDragDropEnabled(true); |
| 760 | 760 |
| 761 if (switches::IsTouchEditingEnabled()) | 761 if (switches::IsTouchEditingEnabled()) |
| 762 webview()->settings()->setTouchEditingEnabled(true); | 762 webview()->settings()->setTouchEditingEnabled(true); |
| 763 | 763 |
| 764 #if defined(OS_ANDROID) | |
| 765 WebSettings::SelectionStrategyType selection_strategy_default = | |
| 766 WebSettings::StrategyDirection; | |
| 767 #else | |
| 768 WebSettings::SelectionStrategyType selection_strategy_default = | |
| 769 WebSettings::StrategyCharacter; | |
| 770 #endif | |
| 771 | |
| 772 WebSettings::SelectionStrategyType selection_strategy = | |
| 773 selection_strategy_default; | |
| 774 const std::string selection_strategy_str = | |
| 775 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( | |
| 776 switches::kTouchTextSelectionStrategy); | |
| 777 if (selection_strategy_str == "0") | |
|
Charlie Reis
2015/04/22 19:04:59
From the earlier discussion, I think "character" o
mfomitchev
2015/04/22 21:17:24
Done.
| |
| 778 selection_strategy = WebSettings::StrategyCharacter; | |
| 779 else if (selection_strategy_str == "1") | |
| 780 selection_strategy = WebSettings::StrategyDirection; | |
| 781 webview()->settings()->setSelectionStrategy(selection_strategy); | |
| 782 | |
| 764 if (!params.frame_name.empty()) | 783 if (!params.frame_name.empty()) |
| 765 webview()->mainFrame()->setName(params.frame_name); | 784 webview()->mainFrame()->setName(params.frame_name); |
| 766 | 785 |
| 767 // TODO(davidben): Move this state from Blink into content. | 786 // TODO(davidben): Move this state from Blink into content. |
| 768 if (params.window_was_created_with_opener) | 787 if (params.window_was_created_with_opener) |
| 769 webview()->setOpenedByDOM(); | 788 webview()->setOpenedByDOM(); |
| 770 | 789 |
| 771 OnSetRendererPrefs(params.renderer_preferences); | 790 OnSetRendererPrefs(params.renderer_preferences); |
| 772 | 791 |
| 773 ApplyBlinkSettings(command_line, webview()->settings()); | 792 ApplyBlinkSettings(command_line, webview()->settings()); |
| (...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3769 std::vector<gfx::Size> sizes; | 3788 std::vector<gfx::Size> sizes; |
| 3770 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3789 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3771 if (!url.isEmpty()) | 3790 if (!url.isEmpty()) |
| 3772 urls.push_back( | 3791 urls.push_back( |
| 3773 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3792 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3774 } | 3793 } |
| 3775 SendUpdateFaviconURL(urls); | 3794 SendUpdateFaviconURL(urls); |
| 3776 } | 3795 } |
| 3777 | 3796 |
| 3778 } // namespace content | 3797 } // namespace content |
| OLD | NEW |