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

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

Issue 725243002: add flag to disable link disambiguation popup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add histogram.xml entry for flag Created 6 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
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 4033 matching lines...) Expand 10 before | Expand all | Expand 10 after
4044 if (!main_frame) 4044 if (!main_frame)
4045 return; 4045 return;
4046 main_frame->enableViewSourceMode(true); 4046 main_frame->enableViewSourceMode(true);
4047 } 4047 }
4048 4048
4049 #if defined(OS_ANDROID) || defined(TOOLKIT_VIEWS) 4049 #if defined(OS_ANDROID) || defined(TOOLKIT_VIEWS)
4050 bool RenderViewImpl::didTapMultipleTargets( 4050 bool RenderViewImpl::didTapMultipleTargets(
4051 const WebSize& inner_viewport_offset, 4051 const WebSize& inner_viewport_offset,
4052 const WebRect& touch_rect, 4052 const WebRect& touch_rect,
4053 const WebVector<WebRect>& target_rects) { 4053 const WebVector<WebRect>& target_rects) {
4054 if (!switches::IsLinkDisambiguationPopupEnabled())
jdduke (slow) 2014/11/23 20:01:00 Could we either cache this switch or push it to Bl
4055 return false;
4056
4054 // Never show a disambiguation popup when accessibility is enabled, 4057 // Never show a disambiguation popup when accessibility is enabled,
4055 // as this interferes with "touch exploration". 4058 // as this interferes with "touch exploration".
4056 AccessibilityMode accessibility_mode = 4059 AccessibilityMode accessibility_mode =
4057 GetMainRenderFrame()->accessibility_mode(); 4060 GetMainRenderFrame()->accessibility_mode();
4058 bool matches_accessibility_mode_complete = 4061 bool matches_accessibility_mode_complete =
4059 (accessibility_mode & AccessibilityModeComplete) == 4062 (accessibility_mode & AccessibilityModeComplete) ==
4060 AccessibilityModeComplete; 4063 AccessibilityModeComplete;
4061 if (matches_accessibility_mode_complete) 4064 if (matches_accessibility_mode_complete)
4062 return false; 4065 return false;
4063 4066
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
4226 std::vector<gfx::Size> sizes; 4229 std::vector<gfx::Size> sizes;
4227 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4230 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4228 if (!url.isEmpty()) 4231 if (!url.isEmpty())
4229 urls.push_back( 4232 urls.push_back(
4230 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4233 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4231 } 4234 }
4232 SendUpdateFaviconURL(urls); 4235 SendUpdateFaviconURL(urls);
4233 } 4236 }
4234 4237
4235 } // namespace content 4238 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698