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

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

Issue 351683002: Adds link disambiguation popup support to Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: responding to sky's last round of feedback Created 6 years, 3 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 #include "v8/include/v8.h" 194 #include "v8/include/v8.h"
195 195
196 #if defined(OS_ANDROID) 196 #if defined(OS_ANDROID)
197 #include <cpu-features.h> 197 #include <cpu-features.h>
198 198
199 #include "content/renderer/android/address_detector.h" 199 #include "content/renderer/android/address_detector.h"
200 #include "content/renderer/android/content_detector.h" 200 #include "content/renderer/android/content_detector.h"
201 #include "content/renderer/android/email_detector.h" 201 #include "content/renderer/android/email_detector.h"
202 #include "content/renderer/android/phone_number_detector.h" 202 #include "content/renderer/android/phone_number_detector.h"
203 #include "net/android/network_library.h" 203 #include "net/android/network_library.h"
204 #include "skia/ext/platform_canvas.h"
205 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 204 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
206 #include "third_party/WebKit/public/platform/WebFloatRect.h" 205 #include "third_party/WebKit/public/platform/WebFloatRect.h"
207 #include "ui/gfx/rect_f.h" 206 #include "ui/gfx/rect_f.h"
208 207
209 #elif defined(OS_WIN) 208 #elif defined(OS_WIN)
210 // TODO(port): these files are currently Windows only because they concern: 209 // TODO(port): these files are currently Windows only because they concern:
211 // * theming 210 // * theming
212 #include "ui/native_theme/native_theme_win.h" 211 #include "ui/native_theme/native_theme_win.h"
213 #elif defined(USE_X11) 212 #elif defined(USE_X11)
214 #include "ui/native_theme/native_theme.h" 213 #include "ui/native_theme/native_theme.h"
215 #elif defined(OS_MACOSX) 214 #elif defined(OS_MACOSX)
216 #include "skia/ext/skia_utils_mac.h" 215 #include "skia/ext/skia_utils_mac.h"
217 #endif 216 #endif
218 217
218 // Support for link disambiguation popup.
219 #if defined(OS_ANDROID) || defined(TOOLKIT_VIEWS)
220 #include "skia/ext/platform_canvas.h"
221 #endif
222
219 #if defined(ENABLE_PLUGINS) 223 #if defined(ENABLE_PLUGINS)
220 #include "content/renderer/npapi/webplugin_delegate_proxy.h" 224 #include "content/renderer/npapi/webplugin_delegate_proxy.h"
221 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 225 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
222 #include "content/renderer/pepper/pepper_plugin_registry.h" 226 #include "content/renderer/pepper/pepper_plugin_registry.h"
223 #endif 227 #endif
224 228
225 #if defined(ENABLE_WEBRTC) 229 #if defined(ENABLE_WEBRTC)
226 #include "content/renderer/media/rtc_peer_connection_handler.h" 230 #include "content/renderer/media/rtc_peer_connection_handler.h"
227 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" 231 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
228 #endif 232 #endif
(...skipping 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after
4024 4028
4025 void RenderViewImpl::OnEnableViewSourceMode() { 4029 void RenderViewImpl::OnEnableViewSourceMode() {
4026 if (!webview()) 4030 if (!webview())
4027 return; 4031 return;
4028 WebFrame* main_frame = webview()->mainFrame(); 4032 WebFrame* main_frame = webview()->mainFrame();
4029 if (!main_frame) 4033 if (!main_frame)
4030 return; 4034 return;
4031 main_frame->enableViewSourceMode(true); 4035 main_frame->enableViewSourceMode(true);
4032 } 4036 }
4033 4037
4034 #if defined(OS_ANDROID) 4038 #if defined(OS_ANDROID) || defined(TOOLKIT_VIEWS)
4035 bool RenderViewImpl::didTapMultipleTargets( 4039 bool RenderViewImpl::didTapMultipleTargets(
4036 const blink::WebGestureEvent& event, 4040 const blink::WebGestureEvent& event,
4037 const WebVector<WebRect>& target_rects) { 4041 const WebVector<WebRect>& target_rects) {
4038 // Never show a disambiguation popup when accessibility is enabled, 4042 // Never show a disambiguation popup when accessibility is enabled,
4039 // as this interferes with "touch exploration". 4043 // as this interferes with "touch exploration".
4040 AccessibilityMode accessibility_mode = 4044 AccessibilityMode accessibility_mode =
4041 main_render_frame()->accessibility_mode(); 4045 main_render_frame()->accessibility_mode();
4042 bool matches_accessibility_mode_complete = 4046 bool matches_accessibility_mode_complete =
4043 (accessibility_mode & AccessibilityModeComplete) == 4047 (accessibility_mode & AccessibilityModeComplete) ==
4044 AccessibilityModeComplete; 4048 AccessibilityModeComplete;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
4102 handled = true; 4106 handled = true;
4103 break; 4107 break;
4104 } 4108 }
4105 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: 4109 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE:
4106 // No-op. 4110 // No-op.
4107 break; 4111 break;
4108 } 4112 }
4109 4113
4110 return handled; 4114 return handled;
4111 } 4115 }
4112 #endif 4116 #endif // defined(OS_ANDROID) || defined(TOOLKIT_VIEWS)
4113 4117
4114 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { 4118 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const {
4115 return history_list_length_; 4119 return history_list_length_;
4116 } 4120 }
4117 4121
4118 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { 4122 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) {
4119 if (enable) { 4123 if (enable) {
4120 if (has_focus()) 4124 if (has_focus())
4121 return; 4125 return;
4122 OnSetActive(true); 4126 OnSetActive(true);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
4200 std::vector<gfx::Size> sizes; 4204 std::vector<gfx::Size> sizes;
4201 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4205 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4202 if (!url.isEmpty()) 4206 if (!url.isEmpty())
4203 urls.push_back( 4207 urls.push_back(
4204 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4208 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4205 } 4209 }
4206 SendUpdateFaviconURL(urls); 4210 SendUpdateFaviconURL(urls);
4207 } 4211 }
4208 4212
4209 } // namespace content 4213 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698