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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 webview()->setMainFrame(main_render_frame_->GetWebFrame()); | 756 webview()->setMainFrame(main_render_frame_->GetWebFrame()); |
757 } | 757 } |
758 main_render_frame_->Initialize(); | 758 main_render_frame_->Initialize(); |
759 | 759 |
760 if (switches::IsTouchDragDropEnabled()) | 760 if (switches::IsTouchDragDropEnabled()) |
761 webview()->settings()->setTouchDragDropEnabled(true); | 761 webview()->settings()->setTouchDragDropEnabled(true); |
762 | 762 |
763 if (switches::IsTouchEditingEnabled()) | 763 if (switches::IsTouchEditingEnabled()) |
764 webview()->settings()->setTouchEditingEnabled(true); | 764 webview()->settings()->setTouchEditingEnabled(true); |
765 | 765 |
| 766 const std::string selection_strategy_str = |
| 767 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
| 768 switches::kTouchTextSelectionStrategy); |
| 769 if (selection_strategy_str == "1") { |
| 770 webview()->settings()->setSelectionStrategy( |
| 771 WebSettings::StrategyDirection); |
| 772 } |
| 773 |
766 if (!params.frame_name.empty()) | 774 if (!params.frame_name.empty()) |
767 webview()->mainFrame()->setName(params.frame_name); | 775 webview()->mainFrame()->setName(params.frame_name); |
768 | 776 |
769 // TODO(davidben): Move this state from Blink into content. | 777 // TODO(davidben): Move this state from Blink into content. |
770 if (params.window_was_created_with_opener) | 778 if (params.window_was_created_with_opener) |
771 webview()->setOpenedByDOM(); | 779 webview()->setOpenedByDOM(); |
772 | 780 |
773 OnSetRendererPrefs(params.renderer_preferences); | 781 OnSetRendererPrefs(params.renderer_preferences); |
774 | 782 |
775 if (!params.enable_auto_resize) { | 783 if (!params.enable_auto_resize) { |
(...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4001 std::vector<gfx::Size> sizes; | 4009 std::vector<gfx::Size> sizes; |
4002 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4010 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4003 if (!url.isEmpty()) | 4011 if (!url.isEmpty()) |
4004 urls.push_back( | 4012 urls.push_back( |
4005 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4013 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4006 } | 4014 } |
4007 SendUpdateFaviconURL(urls); | 4015 SendUpdateFaviconURL(urls); |
4008 } | 4016 } |
4009 | 4017 |
4010 } // namespace content | 4018 } // namespace content |
OLD | NEW |