Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 15741009: Native Android accessibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 6517 matching lines...) Expand 10 before | Expand all | Expand 10 after
6528 6528
6529 WebFrame* main_frame = webview()->mainFrame(); 6529 WebFrame* main_frame = webview()->mainFrame();
6530 if (main_frame && main_frame->opener()) 6530 if (main_frame && main_frame->opener())
6531 main_frame->setOpener(NULL); 6531 main_frame->setOpener(NULL);
6532 } 6532 }
6533 6533
6534 #if defined(OS_ANDROID) 6534 #if defined(OS_ANDROID)
6535 bool RenderViewImpl::didTapMultipleTargets( 6535 bool RenderViewImpl::didTapMultipleTargets(
6536 const WebKit::WebGestureEvent& event, 6536 const WebKit::WebGestureEvent& event,
6537 const WebVector<WebRect>& target_rects) { 6537 const WebVector<WebRect>& target_rects) {
6538 // Never show a disambiguation popup when accessibility is enabled,
6539 // as this interferes with "touch exploration".
6540 if (accessibility_mode_ == AccessibilityModeComplete)
6541 return false;
6542
6538 gfx::Rect finger_rect( 6543 gfx::Rect finger_rect(
6539 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, 6544 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2,
6540 event.data.tap.width, event.data.tap.height); 6545 event.data.tap.width, event.data.tap.height);
6541 gfx::Rect zoom_rect; 6546 gfx::Rect zoom_rect;
6542 float new_total_scale = 6547 float new_total_scale =
6543 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( 6548 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor(
6544 finger_rect, target_rects, GetSize(), 6549 finger_rect, target_rects, GetSize(),
6545 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), 6550 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(),
6546 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); 6551 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect);
6547 if (!new_total_scale) 6552 if (!new_total_scale)
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
6648 WebURL url = icon_urls[i].iconURL(); 6653 WebURL url = icon_urls[i].iconURL();
6649 if (!url.isEmpty()) 6654 if (!url.isEmpty())
6650 urls.push_back(FaviconURL(url, 6655 urls.push_back(FaviconURL(url,
6651 ToFaviconType(icon_urls[i].iconType()))); 6656 ToFaviconType(icon_urls[i].iconType())));
6652 } 6657 }
6653 SendUpdateFaviconURL(urls); 6658 SendUpdateFaviconURL(urls);
6654 } 6659 }
6655 6660
6656 6661
6657 } // namespace content 6662 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698