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

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

Issue 2558933002: Add more fine-grained accessibility modes. (Closed)
Patch Set: Reformat enums as uppercase Created 4 years 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
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <memory> 9 #include <memory>
10 10
(...skipping 2606 matching lines...) Expand 10 before | Expand all | Expand 10 after
2617 #if defined(OS_ANDROID) 2617 #if defined(OS_ANDROID)
2618 bool RenderViewImpl::didTapMultipleTargets( 2618 bool RenderViewImpl::didTapMultipleTargets(
2619 const WebSize& inner_viewport_offset, 2619 const WebSize& inner_viewport_offset,
2620 const WebRect& touch_rect, 2620 const WebRect& touch_rect,
2621 const WebVector<WebRect>& target_rects) { 2621 const WebVector<WebRect>& target_rects) {
2622 // Never show a disambiguation popup when accessibility is enabled, 2622 // Never show a disambiguation popup when accessibility is enabled,
2623 // as this interferes with "touch exploration". 2623 // as this interferes with "touch exploration".
2624 AccessibilityMode accessibility_mode = 2624 AccessibilityMode accessibility_mode =
2625 GetMainRenderFrame()->accessibility_mode(); 2625 GetMainRenderFrame()->accessibility_mode();
2626 bool matches_accessibility_mode_complete = 2626 bool matches_accessibility_mode_complete =
2627 (accessibility_mode & AccessibilityModeComplete) == 2627 (accessibility_mode & ACCESSIBILITY_MODE_COMPLETE) ==
2628 AccessibilityModeComplete; 2628 ACCESSIBILITY_MODE_COMPLETE;
2629 if (matches_accessibility_mode_complete) 2629 if (matches_accessibility_mode_complete)
2630 return false; 2630 return false;
2631 2631
2632 // The touch_rect, target_rects and zoom_rect are in the outer viewport 2632 // The touch_rect, target_rects and zoom_rect are in the outer viewport
2633 // reference frame. 2633 // reference frame.
2634 gfx::Rect zoom_rect; 2634 gfx::Rect zoom_rect;
2635 float new_total_scale = 2635 float new_total_scale =
2636 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( 2636 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor(
2637 touch_rect, target_rects, GetSize(), 2637 touch_rect, target_rects, GetSize(),
2638 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), 2638 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(),
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2819 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2819 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2820 } 2820 }
2821 2821
2822 std::unique_ptr<InputEventAck> ack( 2822 std::unique_ptr<InputEventAck> ack(
2823 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type, 2823 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type,
2824 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2824 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2825 OnInputEventAck(std::move(ack)); 2825 OnInputEventAck(std::move(ack));
2826 } 2826 }
2827 2827
2828 } // namespace content 2828 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698