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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "content/public/common/ssl_status.h" | 60 #include "content/public/common/ssl_status.h" |
61 #include "content/public/common/three_d_api_types.h" | 61 #include "content/public/common/three_d_api_types.h" |
62 #include "content/public/common/url_constants.h" | 62 #include "content/public/common/url_constants.h" |
63 #include "content/public/common/url_utils.h" | 63 #include "content/public/common/url_utils.h" |
64 #include "content/public/renderer/content_renderer_client.h" | 64 #include "content/public/renderer/content_renderer_client.h" |
65 #include "content/public/renderer/document_state.h" | 65 #include "content/public/renderer/document_state.h" |
66 #include "content/public/renderer/navigation_state.h" | 66 #include "content/public/renderer/navigation_state.h" |
67 #include "content/public/renderer/render_view_observer.h" | 67 #include "content/public/renderer/render_view_observer.h" |
68 #include "content/public/renderer/render_view_visitor.h" | 68 #include "content/public/renderer/render_view_visitor.h" |
69 #include "content/public/renderer/web_preferences.h" | 69 #include "content/public/renderer/web_preferences.h" |
70 #include "content/renderer/accessibility/renderer_accessibility.h" | |
71 #include "content/renderer/accessibility/renderer_accessibility_complete.h" | |
72 #include "content/renderer/accessibility/renderer_accessibility_focus_only.h" | |
73 #include "content/renderer/browser_plugin/browser_plugin.h" | 70 #include "content/renderer/browser_plugin/browser_plugin.h" |
74 #include "content/renderer/browser_plugin/browser_plugin_manager.h" | 71 #include "content/renderer/browser_plugin/browser_plugin_manager.h" |
75 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" | 72 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" |
76 #include "content/renderer/devtools/devtools_agent.h" | 73 #include "content/renderer/devtools/devtools_agent.h" |
77 #include "content/renderer/disambiguation_popup_helper.h" | 74 #include "content/renderer/disambiguation_popup_helper.h" |
78 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 75 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
79 #include "content/renderer/drop_data_builder.h" | 76 #include "content/renderer/drop_data_builder.h" |
80 #include "content/renderer/external_popup_menu.h" | 77 #include "content/renderer/external_popup_menu.h" |
81 #include "content/renderer/geolocation_dispatcher.h" | 78 #include "content/renderer/geolocation_dispatcher.h" |
82 #include "content/renderer/gpu/render_widget_compositor.h" | 79 #include "content/renderer/gpu/render_widget_compositor.h" |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 cached_is_main_frame_pinned_to_left_(false), | 645 cached_is_main_frame_pinned_to_left_(false), |
649 cached_is_main_frame_pinned_to_right_(false), | 646 cached_is_main_frame_pinned_to_right_(false), |
650 has_scrolled_focused_editable_node_into_rect_(false), | 647 has_scrolled_focused_editable_node_into_rect_(false), |
651 push_messaging_dispatcher_(NULL), | 648 push_messaging_dispatcher_(NULL), |
652 geolocation_dispatcher_(NULL), | 649 geolocation_dispatcher_(NULL), |
653 speech_recognition_dispatcher_(NULL), | 650 speech_recognition_dispatcher_(NULL), |
654 media_stream_dispatcher_(NULL), | 651 media_stream_dispatcher_(NULL), |
655 browser_plugin_manager_(NULL), | 652 browser_plugin_manager_(NULL), |
656 midi_dispatcher_(NULL), | 653 midi_dispatcher_(NULL), |
657 devtools_agent_(NULL), | 654 devtools_agent_(NULL), |
658 accessibility_mode_(AccessibilityModeOff), | |
659 renderer_accessibility_(NULL), | |
660 mouse_lock_dispatcher_(NULL), | 655 mouse_lock_dispatcher_(NULL), |
661 #if defined(OS_ANDROID) | 656 #if defined(OS_ANDROID) |
662 expected_content_intent_id_(0), | 657 expected_content_intent_id_(0), |
663 #endif | 658 #endif |
664 #if defined(OS_WIN) | 659 #if defined(OS_WIN) |
665 focused_plugin_id_(-1), | 660 focused_plugin_id_(-1), |
666 #endif | 661 #endif |
667 #if defined(ENABLE_PLUGINS) | 662 #if defined(ENABLE_PLUGINS) |
668 plugin_find_handler_(NULL), | 663 plugin_find_handler_(NULL), |
669 focused_pepper_plugin_(NULL), | 664 focused_pepper_plugin_(NULL), |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 // The next group of objects all implement RenderViewObserver, so are deleted | 784 // The next group of objects all implement RenderViewObserver, so are deleted |
790 // along with the RenderView automatically. | 785 // along with the RenderView automatically. |
791 devtools_agent_ = new DevToolsAgent(this); | 786 devtools_agent_ = new DevToolsAgent(this); |
792 if (RenderWidgetCompositor* rwc = compositor()) { | 787 if (RenderWidgetCompositor* rwc = compositor()) { |
793 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); | 788 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); |
794 } | 789 } |
795 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); | 790 mouse_lock_dispatcher_ = new RenderViewMouseLockDispatcher(this); |
796 | 791 |
797 history_controller_.reset(new HistoryController(this)); | 792 history_controller_.reset(new HistoryController(this)); |
798 | 793 |
799 // Create renderer_accessibility_ if needed. | |
800 OnSetAccessibilityMode(params->accessibility_mode); | |
801 | |
802 new IdleUserDetector(this); | 794 new IdleUserDetector(this); |
803 | 795 |
804 if (command_line.HasSwitch(switches::kDomAutomationController)) | 796 if (command_line.HasSwitch(switches::kDomAutomationController)) |
805 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; | 797 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; |
806 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 798 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
807 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; | 799 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; |
808 | 800 |
809 ProcessViewLayoutFlags(command_line); | 801 ProcessViewLayoutFlags(command_line); |
810 | 802 |
811 GetContentClient()->renderer()->RenderViewCreated(this); | 803 GetContentClient()->renderer()->RenderViewCreated(this); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 int32 main_frame_routing_id, | 898 int32 main_frame_routing_id, |
907 int32 surface_id, | 899 int32 surface_id, |
908 int64 session_storage_namespace_id, | 900 int64 session_storage_namespace_id, |
909 const base::string16& frame_name, | 901 const base::string16& frame_name, |
910 bool is_renderer_created, | 902 bool is_renderer_created, |
911 bool swapped_out, | 903 bool swapped_out, |
912 int32 proxy_routing_id, | 904 int32 proxy_routing_id, |
913 bool hidden, | 905 bool hidden, |
914 bool never_visible, | 906 bool never_visible, |
915 int32 next_page_id, | 907 int32 next_page_id, |
916 const blink::WebScreenInfo& screen_info, | 908 const blink::WebScreenInfo& screen_info) { |
917 AccessibilityMode accessibility_mode) { | |
918 DCHECK(routing_id != MSG_ROUTING_NONE); | 909 DCHECK(routing_id != MSG_ROUTING_NONE); |
919 RenderViewImplParams params(opener_id, | 910 RenderViewImplParams params(opener_id, |
920 window_was_created_with_opener, | 911 window_was_created_with_opener, |
921 renderer_prefs, | 912 renderer_prefs, |
922 webkit_prefs, | 913 webkit_prefs, |
923 routing_id, | 914 routing_id, |
924 main_frame_routing_id, | 915 main_frame_routing_id, |
925 surface_id, | 916 surface_id, |
926 session_storage_namespace_id, | 917 session_storage_namespace_id, |
927 frame_name, | 918 frame_name, |
928 is_renderer_created, | 919 is_renderer_created, |
929 swapped_out, | 920 swapped_out, |
930 proxy_routing_id, | 921 proxy_routing_id, |
931 hidden, | 922 hidden, |
932 never_visible, | 923 never_visible, |
933 next_page_id, | 924 next_page_id, |
934 screen_info, | 925 screen_info); |
935 accessibility_mode); | |
936 RenderViewImpl* render_view = NULL; | 926 RenderViewImpl* render_view = NULL; |
937 if (g_create_render_view_impl) | 927 if (g_create_render_view_impl) |
938 render_view = g_create_render_view_impl(¶ms); | 928 render_view = g_create_render_view_impl(¶ms); |
939 else | 929 else |
940 render_view = new RenderViewImpl(¶ms); | 930 render_view = new RenderViewImpl(¶ms); |
941 | 931 |
942 render_view->Initialize(¶ms); | 932 render_view->Initialize(¶ms); |
943 return render_view; | 933 return render_view; |
944 } | 934 } |
945 | 935 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 IPC_MESSAGE_HANDLER(ViewMsg_GetAllSavableResourceLinksForCurrentPage, | 1103 IPC_MESSAGE_HANDLER(ViewMsg_GetAllSavableResourceLinksForCurrentPage, |
1114 OnGetAllSavableResourceLinksForCurrentPage) | 1104 OnGetAllSavableResourceLinksForCurrentPage) |
1115 IPC_MESSAGE_HANDLER( | 1105 IPC_MESSAGE_HANDLER( |
1116 ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, | 1106 ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks, |
1117 OnGetSerializedHtmlDataForCurrentPageWithLocalLinks) | 1107 OnGetSerializedHtmlDataForCurrentPageWithLocalLinks) |
1118 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) | 1108 IPC_MESSAGE_HANDLER(ViewMsg_ShowContextMenu, OnShowContextMenu) |
1119 // TODO(viettrungluu): Move to a separate message filter. | 1109 // TODO(viettrungluu): Move to a separate message filter. |
1120 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryLengthAndPrune, | 1110 IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryLengthAndPrune, |
1121 OnSetHistoryLengthAndPrune) | 1111 OnSetHistoryLengthAndPrune) |
1122 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode) | 1112 IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode) |
1123 IPC_MESSAGE_HANDLER(ViewMsg_SetAccessibilityMode, OnSetAccessibilityMode) | |
1124 IPC_MESSAGE_HANDLER(ViewMsg_DisownOpener, OnDisownOpener) | 1113 IPC_MESSAGE_HANDLER(ViewMsg_DisownOpener, OnDisownOpener) |
1125 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, | 1114 IPC_MESSAGE_HANDLER(ViewMsg_ReleaseDisambiguationPopupBitmap, |
1126 OnReleaseDisambiguationPopupBitmap) | 1115 OnReleaseDisambiguationPopupBitmap) |
1127 IPC_MESSAGE_HANDLER(ViewMsg_WindowSnapshotCompleted, | 1116 IPC_MESSAGE_HANDLER(ViewMsg_WindowSnapshotCompleted, |
1128 OnWindowSnapshotCompleted) | 1117 OnWindowSnapshotCompleted) |
1129 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) | 1118 IPC_MESSAGE_HANDLER(ViewMsg_SelectWordAroundCaret, OnSelectWordAroundCaret) |
1130 #if defined(OS_ANDROID) | 1119 #if defined(OS_ANDROID) |
1131 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, | 1120 IPC_MESSAGE_HANDLER(InputMsg_ActivateNearestFindResult, |
1132 OnActivateNearestFindResult) | 1121 OnActivateNearestFindResult) |
1133 IPC_MESSAGE_HANDLER(ViewMsg_FindMatchRects, OnFindMatchRects) | 1122 IPC_MESSAGE_HANDLER(ViewMsg_FindMatchRects, OnFindMatchRects) |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 main_frame_routing_id, | 1434 main_frame_routing_id, |
1446 surface_id, | 1435 surface_id, |
1447 cloned_session_storage_namespace_id, | 1436 cloned_session_storage_namespace_id, |
1448 base::string16(), // WebCore will take care of setting the correct name. | 1437 base::string16(), // WebCore will take care of setting the correct name. |
1449 true, // is_renderer_created | 1438 true, // is_renderer_created |
1450 false, // swapped_out | 1439 false, // swapped_out |
1451 MSG_ROUTING_NONE, // proxy_routing_id | 1440 MSG_ROUTING_NONE, // proxy_routing_id |
1452 params.disposition == NEW_BACKGROUND_TAB, // hidden | 1441 params.disposition == NEW_BACKGROUND_TAB, // hidden |
1453 never_visible, | 1442 never_visible, |
1454 1, // next_page_id | 1443 1, // next_page_id |
1455 screen_info_, | 1444 screen_info_); |
1456 accessibility_mode_); | |
1457 view->opened_by_user_gesture_ = params.user_gesture; | 1445 view->opened_by_user_gesture_ = params.user_gesture; |
1458 | 1446 |
1459 // Record whether the creator frame is trying to suppress the opener field. | 1447 // Record whether the creator frame is trying to suppress the opener field. |
1460 view->opener_suppressed_ = params.opener_suppressed; | 1448 view->opener_suppressed_ = params.opener_suppressed; |
1461 | 1449 |
1462 return view->webview(); | 1450 return view->webview(); |
1463 } | 1451 } |
1464 | 1452 |
1465 WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) { | 1453 WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) { |
1466 RenderWidget* widget = | 1454 RenderWidget* widget = |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 void RenderViewImpl::focusPrevious() { | 1717 void RenderViewImpl::focusPrevious() { |
1730 Send(new ViewHostMsg_TakeFocus(routing_id_, true)); | 1718 Send(new ViewHostMsg_TakeFocus(routing_id_, true)); |
1731 } | 1719 } |
1732 | 1720 |
1733 void RenderViewImpl::focusedNodeChanged(const WebNode& node) { | 1721 void RenderViewImpl::focusedNodeChanged(const WebNode& node) { |
1734 has_scrolled_focused_editable_node_into_rect_ = false; | 1722 has_scrolled_focused_editable_node_into_rect_ = false; |
1735 | 1723 |
1736 Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node))); | 1724 Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node))); |
1737 | 1725 |
1738 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node)); | 1726 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node)); |
| 1727 |
| 1728 // TODO(dmazzoni): this should be part of RenderFrameObserver. |
| 1729 main_render_frame()->FocusedNodeChanged(node); |
1739 } | 1730 } |
1740 | 1731 |
1741 void RenderViewImpl::numberOfWheelEventHandlersChanged(unsigned num_handlers) { | 1732 void RenderViewImpl::numberOfWheelEventHandlersChanged(unsigned num_handlers) { |
1742 Send(new ViewHostMsg_DidChangeNumWheelEvents(routing_id_, num_handlers)); | 1733 Send(new ViewHostMsg_DidChangeNumWheelEvents(routing_id_, num_handlers)); |
1743 } | 1734 } |
1744 | 1735 |
1745 void RenderViewImpl::didUpdateLayout() { | 1736 void RenderViewImpl::didUpdateLayout() { |
1746 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout()); | 1737 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout()); |
1747 | 1738 |
1748 // We don't always want to set up a timer, only if we've been put in that | 1739 // We don't always want to set up a timer, only if we've been put in that |
(...skipping 16 matching lines...) Expand all Loading... |
1765 int RenderViewImpl::historyBackListCount() { | 1756 int RenderViewImpl::historyBackListCount() { |
1766 return history_list_offset_ < 0 ? 0 : history_list_offset_; | 1757 return history_list_offset_ < 0 ? 0 : history_list_offset_; |
1767 } | 1758 } |
1768 | 1759 |
1769 int RenderViewImpl::historyForwardListCount() { | 1760 int RenderViewImpl::historyForwardListCount() { |
1770 return history_list_length_ - historyBackListCount() - 1; | 1761 return history_list_length_ - historyBackListCount() - 1; |
1771 } | 1762 } |
1772 | 1763 |
1773 void RenderViewImpl::postAccessibilityEvent( | 1764 void RenderViewImpl::postAccessibilityEvent( |
1774 const WebAXObject& obj, blink::WebAXEvent event) { | 1765 const WebAXObject& obj, blink::WebAXEvent event) { |
1775 if (renderer_accessibility_) { | 1766 main_render_frame()->HandleWebAccessibilityEvent(obj, event); |
1776 renderer_accessibility_->HandleWebAccessibilityEvent(obj, event); | |
1777 } | |
1778 } | 1767 } |
1779 | 1768 |
1780 void RenderViewImpl::didUpdateInspectorSetting(const WebString& key, | 1769 void RenderViewImpl::didUpdateInspectorSetting(const WebString& key, |
1781 const WebString& value) { | 1770 const WebString& value) { |
1782 Send(new ViewHostMsg_UpdateInspectorSetting(routing_id_, | 1771 Send(new ViewHostMsg_UpdateInspectorSetting(routing_id_, |
1783 key.utf8(), | 1772 key.utf8(), |
1784 value.utf8())); | 1773 value.utf8())); |
1785 } | 1774 } |
1786 | 1775 |
1787 // blink::WebWidgetClient ---------------------------------------------------- | 1776 // blink::WebWidgetClient ---------------------------------------------------- |
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3161 webview()->clearFocusedElement(); | 3150 webview()->clearFocusedElement(); |
3162 } | 3151 } |
3163 | 3152 |
3164 void RenderViewImpl::OnSetBackgroundOpaque(bool opaque) { | 3153 void RenderViewImpl::OnSetBackgroundOpaque(bool opaque) { |
3165 if (webview()) | 3154 if (webview()) |
3166 webview()->setIsTransparent(!opaque); | 3155 webview()->setIsTransparent(!opaque); |
3167 if (compositor_) | 3156 if (compositor_) |
3168 compositor_->setHasTransparentBackground(!opaque); | 3157 compositor_->setHasTransparentBackground(!opaque); |
3169 } | 3158 } |
3170 | 3159 |
3171 void RenderViewImpl::OnSetAccessibilityMode(AccessibilityMode new_mode) { | |
3172 if (accessibility_mode_ == new_mode) | |
3173 return; | |
3174 accessibility_mode_ = new_mode; | |
3175 if (renderer_accessibility_) { | |
3176 delete renderer_accessibility_; | |
3177 renderer_accessibility_ = NULL; | |
3178 } | |
3179 if (accessibility_mode_ == AccessibilityModeOff) | |
3180 return; | |
3181 | |
3182 if (accessibility_mode_ & AccessibilityModeFlagFullTree) | |
3183 renderer_accessibility_ = new RendererAccessibilityComplete(this); | |
3184 #if !defined(OS_ANDROID) | |
3185 else | |
3186 renderer_accessibility_ = new RendererAccessibilityFocusOnly(this); | |
3187 #endif | |
3188 } | |
3189 | |
3190 void RenderViewImpl::OnSetActive(bool active) { | 3160 void RenderViewImpl::OnSetActive(bool active) { |
3191 if (webview()) | 3161 if (webview()) |
3192 webview()->setIsActive(active); | 3162 webview()->setIsActive(active); |
3193 | 3163 |
3194 #if defined(ENABLE_PLUGINS) && defined(OS_MACOSX) | 3164 #if defined(ENABLE_PLUGINS) && defined(OS_MACOSX) |
3195 std::set<WebPluginDelegateProxy*>::iterator plugin_it; | 3165 std::set<WebPluginDelegateProxy*>::iterator plugin_it; |
3196 for (plugin_it = plugin_delegates_.begin(); | 3166 for (plugin_it = plugin_delegates_.begin(); |
3197 plugin_it != plugin_delegates_.end(); ++plugin_it) { | 3167 plugin_it != plugin_delegates_.end(); ++plugin_it) { |
3198 (*plugin_it)->SetWindowFocus(active); | 3168 (*plugin_it)->SetWindowFocus(active); |
3199 } | 3169 } |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3867 if (main_frame && main_frame->opener()) | 3837 if (main_frame && main_frame->opener()) |
3868 main_frame->setOpener(NULL); | 3838 main_frame->setOpener(NULL); |
3869 } | 3839 } |
3870 | 3840 |
3871 #if defined(OS_ANDROID) | 3841 #if defined(OS_ANDROID) |
3872 bool RenderViewImpl::didTapMultipleTargets( | 3842 bool RenderViewImpl::didTapMultipleTargets( |
3873 const blink::WebGestureEvent& event, | 3843 const blink::WebGestureEvent& event, |
3874 const WebVector<WebRect>& target_rects) { | 3844 const WebVector<WebRect>& target_rects) { |
3875 // Never show a disambiguation popup when accessibility is enabled, | 3845 // Never show a disambiguation popup when accessibility is enabled, |
3876 // as this interferes with "touch exploration". | 3846 // as this interferes with "touch exploration". |
3877 bool matchesAccessibilityModeComplete = | 3847 AccessibilityMode accessibility_mode = |
3878 (accessibility_mode_ & AccessibilityModeComplete) == | 3848 main_render_frame()->accessibility_mode(); |
3879 AccessibilityModeComplete; | 3849 bool matches_accessibility_mode_complete = |
3880 if (matchesAccessibilityModeComplete) | 3850 (accessibility_mode & AccessibilityModeComplete) == |
| 3851 AccessibilityModeComplete; |
| 3852 if (matches_accessibility_mode_complete) |
3881 return false; | 3853 return false; |
3882 | 3854 |
3883 gfx::Rect finger_rect( | 3855 gfx::Rect finger_rect( |
3884 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, | 3856 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, |
3885 event.data.tap.width, event.data.tap.height); | 3857 event.data.tap.width, event.data.tap.height); |
3886 gfx::Rect zoom_rect; | 3858 gfx::Rect zoom_rect; |
3887 float new_total_scale = | 3859 float new_total_scale = |
3888 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( | 3860 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( |
3889 finger_rect, target_rects, GetSize(), | 3861 finger_rect, target_rects, GetSize(), |
3890 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), | 3862 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4065 std::vector<gfx::Size> sizes; | 4037 std::vector<gfx::Size> sizes; |
4066 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4038 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4067 if (!url.isEmpty()) | 4039 if (!url.isEmpty()) |
4068 urls.push_back( | 4040 urls.push_back( |
4069 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4041 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4070 } | 4042 } |
4071 SendUpdateFaviconURL(urls); | 4043 SendUpdateFaviconURL(urls); |
4072 } | 4044 } |
4073 | 4045 |
4074 } // namespace content | 4046 } // namespace content |
OLD | NEW |