| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 #include "content/renderer/websharedworker_proxy.h" | 113 #include "content/renderer/websharedworker_proxy.h" |
| 114 #include "media/audio/audio_output_device.h" | 114 #include "media/audio/audio_output_device.h" |
| 115 #include "media/base/media_switches.h" | 115 #include "media/base/media_switches.h" |
| 116 #include "media/filters/audio_renderer_impl.h" | 116 #include "media/filters/audio_renderer_impl.h" |
| 117 #include "media/filters/gpu_video_accelerator_factories.h" | 117 #include "media/filters/gpu_video_accelerator_factories.h" |
| 118 #include "net/base/data_url.h" | 118 #include "net/base/data_url.h" |
| 119 #include "net/base/escape.h" | 119 #include "net/base/escape.h" |
| 120 #include "net/base/net_errors.h" | 120 #include "net/base/net_errors.h" |
| 121 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 121 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
| 122 #include "net/http/http_util.h" | 122 #include "net/http/http_util.h" |
| 123 #include "skia/ext/platform_canvas.h" |
| 123 #include "third_party/WebKit/public/platform/WebCString.h" | 124 #include "third_party/WebKit/public/platform/WebCString.h" |
| 124 #include "third_party/WebKit/public/platform/WebConnectionType.h" | 125 #include "third_party/WebKit/public/platform/WebConnectionType.h" |
| 125 #include "third_party/WebKit/public/platform/WebDragData.h" | 126 #include "third_party/WebKit/public/platform/WebDragData.h" |
| 126 #include "third_party/WebKit/public/platform/WebHTTPBody.h" | 127 #include "third_party/WebKit/public/platform/WebHTTPBody.h" |
| 127 #include "third_party/WebKit/public/platform/WebImage.h" | 128 #include "third_party/WebKit/public/platform/WebImage.h" |
| 128 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" | 129 #include "third_party/WebKit/public/platform/WebMessagePortChannel.h" |
| 129 #include "third_party/WebKit/public/platform/WebPoint.h" | 130 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 130 #include "third_party/WebKit/public/platform/WebRect.h" | 131 #include "third_party/WebKit/public/platform/WebRect.h" |
| 131 #include "third_party/WebKit/public/platform/WebSize.h" | 132 #include "third_party/WebKit/public/platform/WebSize.h" |
| 132 #include "third_party/WebKit/public/platform/WebSocketStreamHandle.h" | 133 #include "third_party/WebKit/public/platform/WebSocketStreamHandle.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 #include "v8/include/v8.h" | 196 #include "v8/include/v8.h" |
| 196 | 197 |
| 197 #if defined(OS_ANDROID) | 198 #if defined(OS_ANDROID) |
| 198 #include <cpu-features.h> | 199 #include <cpu-features.h> |
| 199 | 200 |
| 200 #include "content/renderer/android/address_detector.h" | 201 #include "content/renderer/android/address_detector.h" |
| 201 #include "content/renderer/android/content_detector.h" | 202 #include "content/renderer/android/content_detector.h" |
| 202 #include "content/renderer/android/email_detector.h" | 203 #include "content/renderer/android/email_detector.h" |
| 203 #include "content/renderer/android/phone_number_detector.h" | 204 #include "content/renderer/android/phone_number_detector.h" |
| 204 #include "net/android/network_library.h" | 205 #include "net/android/network_library.h" |
| 205 #include "skia/ext/platform_canvas.h" | |
| 206 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 206 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
| 207 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 207 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
| 208 #include "ui/gfx/rect_f.h" | 208 #include "ui/gfx/rect_f.h" |
| 209 | 209 |
| 210 #elif defined(OS_WIN) | 210 #elif defined(OS_WIN) |
| 211 // TODO(port): these files are currently Windows only because they concern: | 211 // TODO(port): these files are currently Windows only because they concern: |
| 212 // * theming | 212 // * theming |
| 213 #include "ui/native_theme/native_theme_win.h" | 213 #include "ui/native_theme/native_theme_win.h" |
| 214 #elif defined(USE_X11) | 214 #elif defined(USE_X11) |
| 215 #include "ui/native_theme/native_theme.h" | 215 #include "ui/native_theme/native_theme.h" |
| (...skipping 3824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4040 | 4040 |
| 4041 void RenderViewImpl::OnEnableViewSourceMode() { | 4041 void RenderViewImpl::OnEnableViewSourceMode() { |
| 4042 if (!webview()) | 4042 if (!webview()) |
| 4043 return; | 4043 return; |
| 4044 WebFrame* main_frame = webview()->mainFrame(); | 4044 WebFrame* main_frame = webview()->mainFrame(); |
| 4045 if (!main_frame) | 4045 if (!main_frame) |
| 4046 return; | 4046 return; |
| 4047 main_frame->enableViewSourceMode(true); | 4047 main_frame->enableViewSourceMode(true); |
| 4048 } | 4048 } |
| 4049 | 4049 |
| 4050 #if defined(OS_ANDROID) | 4050 #if defined(OS_ANDROID) || defined(TOOLKIT_VIEWS) |
| 4051 bool RenderViewImpl::didTapMultipleTargets( | 4051 bool RenderViewImpl::didTapMultipleTargets( |
| 4052 const blink::WebGestureEvent& event, | 4052 const blink::WebGestureEvent& event, |
| 4053 const WebVector<WebRect>& target_rects) { | 4053 const WebVector<WebRect>& target_rects) { |
| 4054 // Never show a disambiguation popup when accessibility is enabled, | 4054 // Never show a disambiguation popup when accessibility is enabled, |
| 4055 // as this interferes with "touch exploration". | 4055 // as this interferes with "touch exploration". |
| 4056 AccessibilityMode accessibility_mode = | 4056 AccessibilityMode accessibility_mode = |
| 4057 GetMainRenderFrame()->accessibility_mode(); | 4057 GetMainRenderFrame()->accessibility_mode(); |
| 4058 bool matches_accessibility_mode_complete = | 4058 bool matches_accessibility_mode_complete = |
| 4059 (accessibility_mode & AccessibilityModeComplete) == | 4059 (accessibility_mode & AccessibilityModeComplete) == |
| 4060 AccessibilityModeComplete; | 4060 AccessibilityModeComplete; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4118 handled = true; | 4118 handled = true; |
| 4119 break; | 4119 break; |
| 4120 } | 4120 } |
| 4121 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: | 4121 case TAP_MULTIPLE_TARGETS_STRATEGY_NONE: |
| 4122 // No-op. | 4122 // No-op. |
| 4123 break; | 4123 break; |
| 4124 } | 4124 } |
| 4125 | 4125 |
| 4126 return handled; | 4126 return handled; |
| 4127 } | 4127 } |
| 4128 #endif | 4128 #endif // defined(OS_ANDROID) || defined(TOOLKIT_VIEWS) |
| 4129 | 4129 |
| 4130 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { | 4130 unsigned RenderViewImpl::GetLocalSessionHistoryLengthForTesting() const { |
| 4131 return history_list_length_; | 4131 return history_list_length_; |
| 4132 } | 4132 } |
| 4133 | 4133 |
| 4134 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { | 4134 void RenderViewImpl::SetFocusAndActivateForTesting(bool enable) { |
| 4135 if (enable) { | 4135 if (enable) { |
| 4136 if (has_focus()) | 4136 if (has_focus()) |
| 4137 return; | 4137 return; |
| 4138 OnSetActive(true); | 4138 OnSetActive(true); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4216 std::vector<gfx::Size> sizes; | 4216 std::vector<gfx::Size> sizes; |
| 4217 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4217 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4218 if (!url.isEmpty()) | 4218 if (!url.isEmpty()) |
| 4219 urls.push_back( | 4219 urls.push_back( |
| 4220 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4220 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4221 } | 4221 } |
| 4222 SendUpdateFaviconURL(urls); | 4222 SendUpdateFaviconURL(urls); |
| 4223 } | 4223 } |
| 4224 | 4224 |
| 4225 } // namespace content | 4225 } // namespace content |
| OLD | NEW |