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

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: Candidate patch for public demo 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 6404 matching lines...) Expand 10 before | Expand all | Expand 10 after
6415 6415
6416 WebFrame* main_frame = webview()->mainFrame(); 6416 WebFrame* main_frame = webview()->mainFrame();
6417 if (main_frame && main_frame->opener()) 6417 if (main_frame && main_frame->opener())
6418 main_frame->setOpener(NULL); 6418 main_frame->setOpener(NULL);
6419 } 6419 }
6420 6420
6421 #if defined(OS_ANDROID) 6421 #if defined(OS_ANDROID)
6422 bool RenderViewImpl::didTapMultipleTargets( 6422 bool RenderViewImpl::didTapMultipleTargets(
6423 const WebKit::WebGestureEvent& event, 6423 const WebKit::WebGestureEvent& event,
6424 const WebVector<WebRect>& target_rects) { 6424 const WebVector<WebRect>& target_rects) {
6425 // Never show a disambiguation popup when accessibility is enabled,
6426 // as this interferes with "touch exploration".
6427 if (accessibility_mode_ == AccessibilityModeComplete)
6428 return false;
6429
6425 gfx::Rect finger_rect( 6430 gfx::Rect finger_rect(
6426 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2, 6431 event.x - event.data.tap.width / 2, event.y - event.data.tap.height / 2,
6427 event.data.tap.width, event.data.tap.height); 6432 event.data.tap.width, event.data.tap.height);
6428 gfx::Rect zoom_rect; 6433 gfx::Rect zoom_rect;
6429 float new_total_scale = 6434 float new_total_scale =
6430 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( 6435 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor(
6431 finger_rect, target_rects, GetSize(), 6436 finger_rect, target_rects, GetSize(),
6432 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), 6437 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(),
6433 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); 6438 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect);
6434 if (!new_total_scale) 6439 if (!new_total_scale)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
6526 WebURL url = icon_urls[i].iconURL(); 6531 WebURL url = icon_urls[i].iconURL();
6527 if (!url.isEmpty()) 6532 if (!url.isEmpty())
6528 urls.push_back(FaviconURL(url, 6533 urls.push_back(FaviconURL(url,
6529 ToFaviconType(icon_urls[i].iconType()))); 6534 ToFaviconType(icon_urls[i].iconType())));
6530 } 6535 }
6531 SendUpdateFaviconURL(urls); 6536 SendUpdateFaviconURL(urls);
6532 } 6537 }
6533 6538
6534 6539
6535 } // namespace content 6540 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698