| OLD | NEW |
| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 #include "webkit/child/weburlresponse_extradata_impl.h" | 196 #include "webkit/child/weburlresponse_extradata_impl.h" |
| 197 | 197 |
| 198 #if defined(OS_ANDROID) | 198 #if defined(OS_ANDROID) |
| 199 #include <cpu-features.h> | 199 #include <cpu-features.h> |
| 200 | 200 |
| 201 #include "content/renderer/android/address_detector.h" | 201 #include "content/renderer/android/address_detector.h" |
| 202 #include "content/renderer/android/content_detector.h" | 202 #include "content/renderer/android/content_detector.h" |
| 203 #include "content/renderer/android/email_detector.h" | 203 #include "content/renderer/android/email_detector.h" |
| 204 #include "content/renderer/android/phone_number_detector.h" | 204 #include "content/renderer/android/phone_number_detector.h" |
| 205 #include "net/android/network_library.h" | 205 #include "net/android/network_library.h" |
| 206 #include "skia/ext/platform_canvas.h" | |
| 207 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 206 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
| 208 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 207 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
| 209 #include "third_party/WebKit/public/web/WebHitTestResult.h" | 208 #include "third_party/WebKit/public/web/WebHitTestResult.h" |
| 210 #include "ui/gfx/rect_f.h" | 209 #include "ui/gfx/rect_f.h" |
| 211 | 210 |
| 212 #elif defined(OS_WIN) | 211 #elif defined(OS_WIN) |
| 213 // TODO(port): these files are currently Windows only because they concern: | 212 // TODO(port): these files are currently Windows only because they concern: |
| 214 // * theming | 213 // * theming |
| 215 #include "ui/native_theme/native_theme_win.h" | 214 #include "ui/native_theme/native_theme_win.h" |
| 216 #elif defined(USE_X11) | 215 #elif defined(USE_X11) |
| 217 #include "ui/native_theme/native_theme.h" | 216 #include "ui/native_theme/native_theme.h" |
| 218 #elif defined(OS_MACOSX) | 217 #elif defined(OS_MACOSX) |
| 219 #include "skia/ext/skia_utils_mac.h" | 218 #include "skia/ext/skia_utils_mac.h" |
| 220 #endif | 219 #endif |
| 221 | 220 |
| 221 // Support for link disambiguation popup. |
| 222 #if defined(OS_ANDROID) || defined(OS_WIN) |
| 223 #include "skia/ext/platform_canvas.h" |
| 224 #endif |
| 225 |
| 222 #if defined(ENABLE_PLUGINS) | 226 #if defined(ENABLE_PLUGINS) |
| 223 #include "content/renderer/npapi/webplugin_delegate_proxy.h" | 227 #include "content/renderer/npapi/webplugin_delegate_proxy.h" |
| 224 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 228 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 225 #include "content/renderer/pepper/pepper_plugin_registry.h" | 229 #include "content/renderer/pepper/pepper_plugin_registry.h" |
| 226 #endif | 230 #endif |
| 227 | 231 |
| 228 #if defined(ENABLE_WEBRTC) | 232 #if defined(ENABLE_WEBRTC) |
| 229 #include "content/renderer/media/rtc_peer_connection_handler.h" | 233 #include "content/renderer/media/rtc_peer_connection_handler.h" |
| 230 #endif | 234 #endif |
| 231 | 235 |
| (...skipping 3862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4094 | 4098 |
| 4095 void RenderViewImpl::OnDisownOpener() { | 4099 void RenderViewImpl::OnDisownOpener() { |
| 4096 if (!webview()) | 4100 if (!webview()) |
| 4097 return; | 4101 return; |
| 4098 | 4102 |
| 4099 WebFrame* main_frame = webview()->mainFrame(); | 4103 WebFrame* main_frame = webview()->mainFrame(); |
| 4100 if (main_frame && main_frame->opener()) | 4104 if (main_frame && main_frame->opener()) |
| 4101 main_frame->setOpener(NULL); | 4105 main_frame->setOpener(NULL); |
| 4102 } | 4106 } |
| 4103 | 4107 |
| 4104 #if defined(OS_ANDROID) | 4108 #if defined(OS_ANDROID) || defined(OS_WIN) |
| 4105 bool RenderViewImpl::didTapMultipleTargets( | 4109 bool RenderViewImpl::didTapMultipleTargets( |
| 4106 const blink::WebGestureEvent& event, | 4110 const blink::WebGestureEvent& event, |
| 4107 const WebVector<WebRect>& target_rects) { | 4111 const WebVector<WebRect>& target_rects) { |
| 4108 // Never show a disambiguation popup when accessibility is enabled, | 4112 // Never show a disambiguation popup when accessibility is enabled, |
| 4109 // as this interferes with "touch exploration". | 4113 // as this interferes with "touch exploration". |
| 4110 AccessibilityMode accessibility_mode = | 4114 AccessibilityMode accessibility_mode = |
| 4111 main_render_frame()->accessibility_mode(); | 4115 main_render_frame()->accessibility_mode(); |
| 4112 bool matches_accessibility_mode_complete = | 4116 bool matches_accessibility_mode_complete = |
| 4113 (accessibility_mode & AccessibilityModeComplete) == | 4117 (accessibility_mode & AccessibilityModeComplete) == |
| 4114 AccessibilityModeComplete; | 4118 AccessibilityModeComplete; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4172 handled = true; | 4176 handled = true; |
| 4173 break; | 4177 break; |
| 4174 } | 4178 } |
| 4175 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: | 4179 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: |
| 4176 // No-op. | 4180 // No-op. |
| 4177 break; | 4181 break; |
| 4178 } | 4182 } |
| 4179 | 4183 |
| 4180 return handled; | 4184 return handled; |
| 4181 } | 4185 } |
| 4182 #endif | 4186 #endif // defined(OS_ANDROID) || defined(OS_WIN) |
| 4183 | 4187 |
| 4184 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { | 4188 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { |
| 4185 return history_list_length_; | 4189 return history_list_length_; |
| 4186 } | 4190 } |
| 4187 | 4191 |
| 4188 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { | 4192 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { |
| 4189 if (enable) { | 4193 if (enable) { |
| 4190 if (has_focus()) | 4194 if (has_focus()) |
| 4191 return; | 4195 return; |
| 4192 OnSetActive(true); | 4196 OnSetActive(true); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4270 std::vector<gfx::Size> sizes; | 4274 std::vector<gfx::Size> sizes; |
| 4271 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4275 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4272 if (!url.isEmpty()) | 4276 if (!url.isEmpty()) |
| 4273 urls.push_back( | 4277 urls.push_back( |
| 4274 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4278 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4275 } | 4279 } |
| 4276 SendUpdateFaviconURL(urls); | 4280 SendUpdateFaviconURL(urls); |
| 4277 } | 4281 } |
| 4278 | 4282 |
| 4279 } // namespace content | 4283 } // namespace content |
| OLD | NEW |