| 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 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #include "content/renderer/render_thread_impl.h" | 78 #include "content/renderer/render_thread_impl.h" |
| 79 #include "content/renderer/render_widget_fullscreen_pepper.h" | 79 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| 80 #include "content/renderer/renderer_accessibility.h" | 80 #include "content/renderer/renderer_accessibility.h" |
| 81 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | 81 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
| 82 #include "content/renderer/renderer_webstoragenamespace_impl.h" | 82 #include "content/renderer/renderer_webstoragenamespace_impl.h" |
| 83 #include "content/renderer/text_input_client_observer.h" | 83 #include "content/renderer/text_input_client_observer.h" |
| 84 #include "content/renderer/v8_value_converter_impl.h" | 84 #include "content/renderer/v8_value_converter_impl.h" |
| 85 #include "content/renderer/web_ui_bindings.h" | 85 #include "content/renderer/web_ui_bindings.h" |
| 86 #include "content/renderer/webplugin_delegate_proxy.h" | 86 #include "content/renderer/webplugin_delegate_proxy.h" |
| 87 #include "content/renderer/websharedworker_proxy.h" | 87 #include "content/renderer/websharedworker_proxy.h" |
| 88 #include "content/renderer/websocketstreamhandle_impl_extradata_impl.h" |
| 88 #include "media/base/filter_collection.h" | 89 #include "media/base/filter_collection.h" |
| 89 #include "media/base/media_switches.h" | 90 #include "media/base/media_switches.h" |
| 90 #include "media/base/message_loop_factory.h" | 91 #include "media/base/message_loop_factory.h" |
| 91 #include "media/filters/gpu_video_decoder.h" | 92 #include "media/filters/gpu_video_decoder.h" |
| 92 #include "net/base/escape.h" | 93 #include "net/base/escape.h" |
| 93 #include "net/base/net_errors.h" | 94 #include "net/base/net_errors.h" |
| 94 #include "net/http/http_util.h" | 95 #include "net/http/http_util.h" |
| 95 #include "ppapi/c/private/ppb_flash_net_connector.h" | 96 #include "ppapi/c/private/ppb_flash_net_connector.h" |
| 96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" | 97 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" |
| 97 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" | 98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" | 131 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
| 131 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" | 132 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" |
| 132 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.
h" | 133 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.
h" |
| 133 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" | 134 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" |
| 134 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" | 135 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" |
| 135 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne
ctionHandler.h" | 136 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne
ctionHandler.h" |
| 136 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne
ctionHandlerClient.h" | 137 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne
ctionHandlerClient.h" |
| 137 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" | 138 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" |
| 138 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" | 139 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
| 139 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" | 140 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
| 141 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStr
eamHandle.h" |
| 140 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 142 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
| 141 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 143 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
| 142 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" | 144 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" |
| 143 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques
t.h" | 145 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques
t.h" |
| 144 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" | 146 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" |
| 145 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" | 147 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" |
| 146 #include "third_party/skia/include/core/SkBitmap.h" | 148 #include "third_party/skia/include/core/SkBitmap.h" |
| 147 #include "ui/base/javascript_message_type.h" | 149 #include "ui/base/javascript_message_type.h" |
| 148 #include "ui/gfx/native_widget_types.h" | 150 #include "ui/gfx/native_widget_types.h" |
| 149 #include "ui/gfx/point.h" | 151 #include "ui/gfx/point.h" |
| 150 #include "ui/gfx/rect.h" | 152 #include "ui/gfx/rect.h" |
| 151 #include "v8/include/v8.h" | 153 #include "v8/include/v8.h" |
| 152 #include "webkit/appcache/web_application_cache_host_impl.h" | 154 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 153 #include "webkit/forms/form_data.h" | 155 #include "webkit/forms/form_data.h" |
| 154 #include "webkit/forms/form_field.h" | 156 #include "webkit/forms/form_field.h" |
| 155 #include "webkit/forms/password_form_dom_manager.h" | 157 #include "webkit/forms/password_form_dom_manager.h" |
| 156 #include "webkit/glue/alt_error_page_resource_fetcher.h" | 158 #include "webkit/glue/alt_error_page_resource_fetcher.h" |
| 157 #include "webkit/glue/dom_operations.h" | 159 #include "webkit/glue/dom_operations.h" |
| 158 #include "webkit/glue/glue_serialize.h" | 160 #include "webkit/glue/glue_serialize.h" |
| 159 #include "webkit/glue/webdropdata.h" | 161 #include "webkit/glue/webdropdata.h" |
| 160 #include "webkit/glue/webkit_constants.h" | 162 #include "webkit/glue/webkit_constants.h" |
| 161 #include "webkit/glue/webkit_glue.h" | 163 #include "webkit/glue/webkit_glue.h" |
| 164 #include "webkit/glue/websocketstreamhandle_impl.h" |
| 162 #include "webkit/glue/weburlloader_impl.h" | 165 #include "webkit/glue/weburlloader_impl.h" |
| 163 #include "webkit/glue/weburlresponse_extradata_impl.h" | 166 #include "webkit/glue/weburlresponse_extradata_impl.h" |
| 164 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 167 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
| 165 #include "webkit/media/webmediaplayer_impl.h" | 168 #include "webkit/media/webmediaplayer_impl.h" |
| 166 #include "webkit/plugins/npapi/plugin_list.h" | 169 #include "webkit/plugins/npapi/plugin_list.h" |
| 167 #include "webkit/plugins/npapi/webplugin_delegate.h" | 170 #include "webkit/plugins/npapi/webplugin_delegate.h" |
| 168 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 171 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
| 169 #include "webkit/plugins/npapi/webplugin_impl.h" | 172 #include "webkit/plugins/npapi/webplugin_impl.h" |
| 170 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" | 173 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" |
| 171 | 174 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 using WebKit::WebRange; | 235 using WebKit::WebRange; |
| 233 using WebKit::WebRect; | 236 using WebKit::WebRect; |
| 234 using WebKit::WebReferrerPolicy; | 237 using WebKit::WebReferrerPolicy; |
| 235 using WebKit::WebScriptSource; | 238 using WebKit::WebScriptSource; |
| 236 using WebKit::WebSearchableFormData; | 239 using WebKit::WebSearchableFormData; |
| 237 using WebKit::WebSecurityOrigin; | 240 using WebKit::WebSecurityOrigin; |
| 238 using WebKit::WebSecurityPolicy; | 241 using WebKit::WebSecurityPolicy; |
| 239 using WebKit::WebSettings; | 242 using WebKit::WebSettings; |
| 240 using WebKit::WebSharedWorker; | 243 using WebKit::WebSharedWorker; |
| 241 using WebKit::WebSize; | 244 using WebKit::WebSize; |
| 245 using WebKit::WebSocketStreamHandle; |
| 242 using WebKit::WebStorageNamespace; | 246 using WebKit::WebStorageNamespace; |
| 243 using WebKit::WebStorageQuotaCallbacks; | 247 using WebKit::WebStorageQuotaCallbacks; |
| 244 using WebKit::WebStorageQuotaError; | 248 using WebKit::WebStorageQuotaError; |
| 245 using WebKit::WebStorageQuotaType; | 249 using WebKit::WebStorageQuotaType; |
| 246 using WebKit::WebString; | 250 using WebKit::WebString; |
| 247 using WebKit::WebTextAffinity; | 251 using WebKit::WebTextAffinity; |
| 248 using WebKit::WebTextDirection; | 252 using WebKit::WebTextDirection; |
| 249 using WebKit::WebTouchEvent; | 253 using WebKit::WebTouchEvent; |
| 250 using WebKit::WebURL; | 254 using WebKit::WebURL; |
| 251 using WebKit::WebURLError; | 255 using WebKit::WebURLError; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 263 using content::RenderThread; | 267 using content::RenderThread; |
| 264 using content::RenderViewObserver; | 268 using content::RenderViewObserver; |
| 265 using content::RenderViewVisitor; | 269 using content::RenderViewVisitor; |
| 266 using content::Referrer; | 270 using content::Referrer; |
| 267 using content::V8ValueConverter; | 271 using content::V8ValueConverter; |
| 268 using webkit::forms::FormField; | 272 using webkit::forms::FormField; |
| 269 using webkit::forms::PasswordForm; | 273 using webkit::forms::PasswordForm; |
| 270 using webkit::forms::PasswordFormDomManager; | 274 using webkit::forms::PasswordFormDomManager; |
| 271 using webkit_glue::AltErrorPageResourceFetcher; | 275 using webkit_glue::AltErrorPageResourceFetcher; |
| 272 using webkit_glue::ResourceFetcher; | 276 using webkit_glue::ResourceFetcher; |
| 277 using webkit_glue::WebSocketStreamHandleImpl; |
| 273 using webkit_glue::WebURLResponseExtraDataImpl; | 278 using webkit_glue::WebURLResponseExtraDataImpl; |
| 274 | 279 |
| 275 //----------------------------------------------------------------------------- | 280 //----------------------------------------------------------------------------- |
| 276 | 281 |
| 277 typedef std::map<WebKit::WebView*, RenderViewImpl*> ViewMap; | 282 typedef std::map<WebKit::WebView*, RenderViewImpl*> ViewMap; |
| 278 static base::LazyInstance<ViewMap> g_view_map = LAZY_INSTANCE_INITIALIZER; | 283 static base::LazyInstance<ViewMap> g_view_map = LAZY_INSTANCE_INITIALIZER; |
| 279 | 284 |
| 280 // Time, in seconds, we delay before sending content state changes (such as form | 285 // Time, in seconds, we delay before sending content state changes (such as form |
| 281 // state and scroll position) to the browser. We delay sending changes to avoid | 286 // state and scroll position) to the browser. We delay sending changes to avoid |
| 282 // spamming the browser. | 287 // spamming the browser. |
| (...skipping 3080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3363 } | 3368 } |
| 3364 | 3369 |
| 3365 void RenderViewImpl::dispatchIntent( | 3370 void RenderViewImpl::dispatchIntent( |
| 3366 WebFrame* frame, const WebIntentRequest& intentRequest) { | 3371 WebFrame* frame, const WebIntentRequest& intentRequest) { |
| 3367 webkit_glue::WebIntentData intent_data(intentRequest.intent()); | 3372 webkit_glue::WebIntentData intent_data(intentRequest.intent()); |
| 3368 int id = intents_host_->RegisterWebIntent(intentRequest); | 3373 int id = intents_host_->RegisterWebIntent(intentRequest); |
| 3369 Send(new IntentsHostMsg_WebIntentDispatch( | 3374 Send(new IntentsHostMsg_WebIntentDispatch( |
| 3370 routing_id_, intent_data, id)); | 3375 routing_id_, intent_data, id)); |
| 3371 } | 3376 } |
| 3372 | 3377 |
| 3378 void RenderViewImpl::willOpenSocketStream( |
| 3379 WebSocketStreamHandle* handle) { |
| 3380 WebSocketStreamHandleImpl* impl = |
| 3381 static_cast<WebSocketStreamHandleImpl*>(handle); |
| 3382 if (impl) |
| 3383 impl->setExtraData( |
| 3384 new WebSocketStreamHandleImplExtraDataImpl(routing_id_)); |
| 3385 } |
| 3386 |
| 3373 // WebKit::WebPageSerializerClient implementation ------------------------------ | 3387 // WebKit::WebPageSerializerClient implementation ------------------------------ |
| 3374 | 3388 |
| 3375 void RenderViewImpl::didSerializeDataForFrame( | 3389 void RenderViewImpl::didSerializeDataForFrame( |
| 3376 const WebURL& frame_url, | 3390 const WebURL& frame_url, |
| 3377 const WebCString& data, | 3391 const WebCString& data, |
| 3378 WebPageSerializerClient::PageSerializationStatus status) { | 3392 WebPageSerializerClient::PageSerializationStatus status) { |
| 3379 Send(new ViewHostMsg_SendSerializedHtmlData( | 3393 Send(new ViewHostMsg_SendSerializedHtmlData( |
| 3380 routing_id(), | 3394 routing_id(), |
| 3381 frame_url, | 3395 frame_url, |
| 3382 data.data(), | 3396 data.data(), |
| (...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5130 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5144 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 5131 return !!RenderThreadImpl::current()->compositor_thread(); | 5145 return !!RenderThreadImpl::current()->compositor_thread(); |
| 5132 } | 5146 } |
| 5133 | 5147 |
| 5134 void RenderViewImpl::OnJavaBridgeInit() { | 5148 void RenderViewImpl::OnJavaBridgeInit() { |
| 5135 DCHECK(!java_bridge_dispatcher_.get()); | 5149 DCHECK(!java_bridge_dispatcher_.get()); |
| 5136 #if defined(ENABLE_JAVA_BRIDGE) | 5150 #if defined(ENABLE_JAVA_BRIDGE) |
| 5137 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5151 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
| 5138 #endif | 5152 #endif |
| 5139 } | 5153 } |
| OLD | NEW |