| 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 6585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6596 | 6596 |
| 6597 WebFrame* main_frame = webview()->mainFrame(); | 6597 WebFrame* main_frame = webview()->mainFrame(); |
| 6598 if (main_frame && main_frame->opener()) | 6598 if (main_frame && main_frame->opener()) |
| 6599 main_frame->setOpener(NULL); | 6599 main_frame->setOpener(NULL); |
| 6600 } | 6600 } |
| 6601 | 6601 |
| 6602 #if defined(OS_ANDROID) | 6602 #if defined(OS_ANDROID) |
| 6603 bool RenderViewImpl::didTapMultipleTargets( | 6603 bool RenderViewImpl::didTapMultipleTargets( |
| 6604 const WebKit::WebGestureEvent& event, | 6604 const WebKit::WebGestureEvent& event, |
| 6605 const WebVector<WebRect>& target_rects) { | 6605 const WebVector<WebRect>& target_rects) { |
| 6606 // Never show a disambiguation popup when accessibility is enabled, |
| 6607 // as this interferes with "touch exploration". |
| 6608 if (accessibility_mode_ == AccessibilityModeComplete) |
| 6609 return false; |
| 6610 |
| 6606 gfx::Rect finger_rect( | 6611 gfx::Rect finger_rect( |
| 6607 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, | 6612 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, |
| 6608 event.data.tap.width, event.data.tap.height); | 6613 event.data.tap.width, event.data.tap.height); |
| 6609 gfx::Rect zoom_rect; | 6614 gfx::Rect zoom_rect; |
| 6610 float new_total_scale = | 6615 float new_total_scale = |
| 6611 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( | 6616 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( |
| 6612 finger_rect, target_rects, GetSize(), | 6617 finger_rect, target_rects, GetSize(), |
| 6613 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), | 6618 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), |
| 6614 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); | 6619 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); |
| 6615 if (!new_total_scale) | 6620 if (!new_total_scale) |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6716 WebURL url = icon_urls[i].iconURL(); | 6721 WebURL url = icon_urls[i].iconURL(); |
| 6717 if (!url.isEmpty()) | 6722 if (!url.isEmpty()) |
| 6718 urls.push_back(FaviconURL(url, | 6723 urls.push_back(FaviconURL(url, |
| 6719 ToFaviconType(icon_urls[i].iconType()))); | 6724 ToFaviconType(icon_urls[i].iconType()))); |
| 6720 } | 6725 } |
| 6721 SendUpdateFaviconURL(urls); | 6726 SendUpdateFaviconURL(urls); |
| 6722 } | 6727 } |
| 6723 | 6728 |
| 6724 | 6729 |
| 6725 } // namespace content | 6730 } // namespace content |
| OLD | NEW |