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

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

Issue 2694413006: Scope and clean up uses of AccessibilityMode. (Closed)
Patch Set: merge Created 3 years, 9 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 #include <memory> 9 #include <memory>
10 10
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 2492
2493 #if defined(OS_ANDROID) 2493 #if defined(OS_ANDROID)
2494 bool RenderViewImpl::didTapMultipleTargets( 2494 bool RenderViewImpl::didTapMultipleTargets(
2495 const WebSize& inner_viewport_offset, 2495 const WebSize& inner_viewport_offset,
2496 const WebRect& touch_rect, 2496 const WebRect& touch_rect,
2497 const WebVector<WebRect>& target_rects) { 2497 const WebVector<WebRect>& target_rects) {
2498 // Never show a disambiguation popup when accessibility is enabled, 2498 // Never show a disambiguation popup when accessibility is enabled,
2499 // as this interferes with "touch exploration". 2499 // as this interferes with "touch exploration".
2500 AccessibilityMode accessibility_mode = 2500 AccessibilityMode accessibility_mode =
2501 GetMainRenderFrame()->accessibility_mode(); 2501 GetMainRenderFrame()->accessibility_mode();
2502 bool matches_accessibility_mode_complete = 2502 if (accessibility_mode == kAccessibilityModeComplete)
2503 (accessibility_mode & ACCESSIBILITY_MODE_COMPLETE) ==
2504 ACCESSIBILITY_MODE_COMPLETE;
2505 if (matches_accessibility_mode_complete)
2506 return false; 2503 return false;
2507 2504
2508 // The touch_rect, target_rects and zoom_rect are in the outer viewport 2505 // The touch_rect, target_rects and zoom_rect are in the outer viewport
2509 // reference frame. 2506 // reference frame.
2510 gfx::Rect zoom_rect; 2507 gfx::Rect zoom_rect;
2511 float new_total_scale = 2508 float new_total_scale =
2512 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( 2509 DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor(
2513 touch_rect, target_rects, GetSize(), 2510 touch_rect, target_rects, GetSize(),
2514 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), 2511 gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(),
2515 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); 2512 device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2712 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2716 } 2713 }
2717 2714
2718 std::unique_ptr<InputEventAck> ack( 2715 std::unique_ptr<InputEventAck> ack(
2719 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(), 2716 new InputEventAck(InputEventAckSource::MAIN_THREAD, input_event->type(),
2720 INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2717 INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
2721 OnInputEventAck(std::move(ack)); 2718 OnInputEventAck(std::move(ack));
2722 } 2719 }
2723 2720
2724 } // namespace content 2721 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/test/accessibility_browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698