Chromium Code Reviews| 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 #include "v8/include/v8.h" | 197 #include "v8/include/v8.h" |
| 198 | 198 |
| 199 #if defined(OS_ANDROID) | 199 #if defined(OS_ANDROID) |
| 200 #include <cpu-features.h> | 200 #include <cpu-features.h> |
| 201 | 201 |
| 202 #include "content/renderer/android/address_detector.h" | 202 #include "content/renderer/android/address_detector.h" |
| 203 #include "content/renderer/android/content_detector.h" | 203 #include "content/renderer/android/content_detector.h" |
| 204 #include "content/renderer/android/email_detector.h" | 204 #include "content/renderer/android/email_detector.h" |
| 205 #include "content/renderer/android/phone_number_detector.h" | 205 #include "content/renderer/android/phone_number_detector.h" |
| 206 #include "net/android/network_library.h" | 206 #include "net/android/network_library.h" |
| 207 #include "skia/ext/platform_canvas.h" | |
| 208 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 207 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
| 209 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 208 #include "third_party/WebKit/public/platform/WebFloatRect.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) | |
|
sky
2014/08/04 20:05:20
OS_WIN->TOOLKIT_VIEWS
luken
2014/09/11 01:07:28
Done.
| |
| 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 3887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4119 | 4123 |
| 4120 void RenderViewImpl::OnDisownOpener() { | 4124 void RenderViewImpl::OnDisownOpener() { |
| 4121 if (!webview()) | 4125 if (!webview()) |
| 4122 return; | 4126 return; |
| 4123 | 4127 |
| 4124 WebFrame* main_frame = webview()->mainFrame(); | 4128 WebFrame* main_frame = webview()->mainFrame(); |
| 4125 if (main_frame && main_frame->opener()) | 4129 if (main_frame && main_frame->opener()) |
| 4126 main_frame->setOpener(NULL); | 4130 main_frame->setOpener(NULL); |
| 4127 } | 4131 } |
| 4128 | 4132 |
| 4129 #if defined(OS_ANDROID) | 4133 #if defined(OS_ANDROID) || defined(OS_WIN) |
|
sky
2014/08/04 20:05:20
OS_WIN->TOOLKIT_VIEWS
luken
2014/09/11 01:07:28
Done.
| |
| 4130 bool RenderViewImpl::didTapMultipleTargets( | 4134 bool RenderViewImpl::didTapMultipleTargets( |
| 4131 const blink::WebGestureEvent& event, | 4135 const blink::WebGestureEvent& event, |
| 4132 const WebVector<WebRect>& target_rects) { | 4136 const WebVector<WebRect>& target_rects) { |
| 4133 // Never show a disambiguation popup when accessibility is enabled, | 4137 // Never show a disambiguation popup when accessibility is enabled, |
| 4134 // as this interferes with "touch exploration". | 4138 // as this interferes with "touch exploration". |
| 4135 AccessibilityMode accessibility_mode = | 4139 AccessibilityMode accessibility_mode = |
| 4136 main_render_frame()->accessibility_mode(); | 4140 main_render_frame()->accessibility_mode(); |
| 4137 bool matches_accessibility_mode_complete = | 4141 bool matches_accessibility_mode_complete = |
| 4138 (accessibility_mode & AccessibilityModeComplete) == | 4142 (accessibility_mode & AccessibilityModeComplete) == |
| 4139 AccessibilityModeComplete; | 4143 AccessibilityModeComplete; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4197 handled = true; | 4201 handled = true; |
| 4198 break; | 4202 break; |
| 4199 } | 4203 } |
| 4200 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: | 4204 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: |
| 4201 // No-op. | 4205 // No-op. |
| 4202 break; | 4206 break; |
| 4203 } | 4207 } |
| 4204 | 4208 |
| 4205 return handled; | 4209 return handled; |
| 4206 } | 4210 } |
| 4207 #endif | 4211 #endif // defined(OS_ANDROID) || defined(OS_WIN) |
| 4208 | 4212 |
| 4209 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { | 4213 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { |
| 4210 return history_list_length_; | 4214 return history_list_length_; |
| 4211 } | 4215 } |
| 4212 | 4216 |
| 4213 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { | 4217 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { |
| 4214 if (enable) { | 4218 if (enable) { |
| 4215 if (has_focus()) | 4219 if (has_focus()) |
| 4216 return; | 4220 return; |
| 4217 OnSetActive(true); | 4221 OnSetActive(true); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4295 std::vector<gfx::Size> sizes; | 4299 std::vector<gfx::Size> sizes; |
| 4296 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4300 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4297 if (!url.isEmpty()) | 4301 if (!url.isEmpty()) |
| 4298 urls.push_back( | 4302 urls.push_back( |
| 4299 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4303 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4300 } | 4304 } |
| 4301 SendUpdateFaviconURL(urls); | 4305 SendUpdateFaviconURL(urls); |
| 4302 } | 4306 } |
| 4303 | 4307 |
| 4304 } // namespace content | 4308 } // namespace content |
| OLD | NEW |