OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 #include "content/renderer/websharedworker_proxy.h" | 80 #include "content/renderer/websharedworker_proxy.h" |
81 #include "media/base/filter_collection.h" | 81 #include "media/base/filter_collection.h" |
82 #include "media/base/media_switches.h" | 82 #include "media/base/media_switches.h" |
83 #include "media/base/message_loop_factory_impl.h" | 83 #include "media/base/message_loop_factory_impl.h" |
84 #include "media/filters/gpu_video_decoder.h" | 84 #include "media/filters/gpu_video_decoder.h" |
85 #include "net/base/escape.h" | 85 #include "net/base/escape.h" |
86 #include "net/base/net_errors.h" | 86 #include "net/base/net_errors.h" |
87 #include "net/http/http_util.h" | 87 #include "net/http/http_util.h" |
88 #include "ppapi/c/private/ppb_flash_net_connector.h" | 88 #include "ppapi/c/private/ppb_flash_net_connector.h" |
89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" | 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec
t.h" |
90 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" | |
91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" | 90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h" |
92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
93 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.
h" | |
94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
95 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.
h" | 93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.
h" |
96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback
s.h" | 94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback
s.h" |
97 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" | 95 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h" |
98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement
.h" | 96 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormControlElement
.h" |
99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" | 97 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFormElement.h" |
100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 98 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
101 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" | |
102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" | 99 #include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h" |
103 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" | |
104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" | 100 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" |
105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 101 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntent.h" | 102 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntent.h" |
107 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo.
h" | 103 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIntentServiceInfo.
h" |
108 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" | 104 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.
h" |
109 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" | 105 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeList.h" |
110 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" | 106 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializer.h" |
111 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 107 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
112 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" | 108 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
113 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" | 109 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h" |
114 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" | 110 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h" |
115 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" | |
116 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" | 111 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h" |
117 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" | |
118 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" | 112 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h" |
119 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData
.h" | 113 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSearchableFormData
.h" |
120 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" | 114 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" |
121 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" | 115 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" |
122 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 116 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
123 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" | |
124 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" | 117 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h
" |
125 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba
cks.h" | 118 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba
cks.h" |
| 119 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 120 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
| 121 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h
" |
| 122 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData.
h" |
| 123 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC
ontext3D.h" |
| 124 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" |
| 125 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" |
| 126 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
| 127 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
126 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 128 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
127 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 129 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
128 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" | 130 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError.
h" |
129 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques
t.h" | 131 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques
t.h" |
130 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" | 132 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon
se.h" |
131 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" | 133 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" |
132 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | |
133 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" | |
134 #include "third_party/skia/include/core/SkBitmap.h" | 134 #include "third_party/skia/include/core/SkBitmap.h" |
135 #include "ui/base/javascript_message_type.h" | 135 #include "ui/base/javascript_message_type.h" |
136 #include "ui/gfx/native_widget_types.h" | 136 #include "ui/gfx/native_widget_types.h" |
137 #include "ui/gfx/point.h" | 137 #include "ui/gfx/point.h" |
138 #include "ui/gfx/rect.h" | 138 #include "ui/gfx/rect.h" |
139 #include "v8/include/v8.h" | 139 #include "v8/include/v8.h" |
140 #include "webkit/appcache/web_application_cache_host_impl.h" | 140 #include "webkit/appcache/web_application_cache_host_impl.h" |
| 141 #include "webkit/forms/form_data.h" |
| 142 #include "webkit/forms/form_field.h" |
| 143 #include "webkit/forms/password_form_dom_manager.h" |
141 #include "webkit/glue/alt_error_page_resource_fetcher.h" | 144 #include "webkit/glue/alt_error_page_resource_fetcher.h" |
142 #include "webkit/glue/context_menu.h" | 145 #include "webkit/glue/context_menu.h" |
143 #include "webkit/glue/dom_operations.h" | 146 #include "webkit/glue/dom_operations.h" |
144 #include "webkit/glue/form_data.h" | |
145 #include "webkit/glue/form_field.h" | |
146 #include "webkit/glue/glue_serialize.h" | 147 #include "webkit/glue/glue_serialize.h" |
147 #include "webkit/glue/password_form_dom_manager.h" | |
148 #include "webkit/glue/webdropdata.h" | 148 #include "webkit/glue/webdropdata.h" |
149 #include "webkit/glue/webkit_constants.h" | 149 #include "webkit/glue/webkit_constants.h" |
150 #include "webkit/glue/webkit_glue.h" | 150 #include "webkit/glue/webkit_glue.h" |
151 #include "webkit/glue/weburlloader_impl.h" | 151 #include "webkit/glue/weburlloader_impl.h" |
152 #include "webkit/media/webmediaplayer_impl.h" | 152 #include "webkit/media/webmediaplayer_impl.h" |
153 #include "webkit/plugins/npapi/plugin_list.h" | 153 #include "webkit/plugins/npapi/plugin_list.h" |
154 #include "webkit/plugins/npapi/webplugin_delegate.h" | 154 #include "webkit/plugins/npapi/webplugin_delegate.h" |
155 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" | 155 #include "webkit/plugins/npapi/webplugin_delegate_impl.h" |
156 #include "webkit/plugins/npapi/webplugin_impl.h" | 156 #include "webkit/plugins/npapi/webplugin_impl.h" |
157 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" | 157 #include "webkit/plugins/ppapi/ppapi_webplugin_impl.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 using appcache::WebApplicationCacheHostImpl; | 243 using appcache::WebApplicationCacheHostImpl; |
244 using base::Time; | 244 using base::Time; |
245 using base::TimeDelta; | 245 using base::TimeDelta; |
246 using content::DocumentState; | 246 using content::DocumentState; |
247 using content::NavigationState; | 247 using content::NavigationState; |
248 using content::RenderThread; | 248 using content::RenderThread; |
249 using content::RenderViewObserver; | 249 using content::RenderViewObserver; |
250 using content::RenderViewVisitor; | 250 using content::RenderViewVisitor; |
251 using content::Referrer; | 251 using content::Referrer; |
252 using content::V8ValueConverter; | 252 using content::V8ValueConverter; |
| 253 using webkit::forms::FormField; |
| 254 using webkit::forms::PasswordForm; |
| 255 using webkit::forms::PasswordFormDomManager; |
253 using webkit_glue::AltErrorPageResourceFetcher; | 256 using webkit_glue::AltErrorPageResourceFetcher; |
254 using webkit_glue::FormField; | |
255 using webkit_glue::PasswordForm; | |
256 using webkit_glue::PasswordFormDomManager; | |
257 using webkit_glue::ResourceFetcher; | 257 using webkit_glue::ResourceFetcher; |
258 | 258 |
259 //----------------------------------------------------------------------------- | 259 //----------------------------------------------------------------------------- |
260 | 260 |
261 typedef std::map<WebKit::WebView*, RenderViewImpl*> ViewMap; | 261 typedef std::map<WebKit::WebView*, RenderViewImpl*> ViewMap; |
262 static base::LazyInstance<ViewMap> g_view_map = LAZY_INSTANCE_INITIALIZER; | 262 static base::LazyInstance<ViewMap> g_view_map = LAZY_INSTANCE_INITIALIZER; |
263 | 263 |
264 // Time, in seconds, we delay before sending content state changes (such as form | 264 // Time, in seconds, we delay before sending content state changes (such as form |
265 // state and scroll position) to the browser. We delay sending changes to avoid | 265 // state and scroll position) to the browser. We delay sending changes to avoid |
266 // spamming the browser. | 266 // spamming the browser. |
(...skipping 4536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4803 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4803 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
4804 return !!RenderThreadImpl::current()->compositor_thread(); | 4804 return !!RenderThreadImpl::current()->compositor_thread(); |
4805 } | 4805 } |
4806 | 4806 |
4807 void RenderViewImpl::OnJavaBridgeInit() { | 4807 void RenderViewImpl::OnJavaBridgeInit() { |
4808 DCHECK(!java_bridge_dispatcher_.get()); | 4808 DCHECK(!java_bridge_dispatcher_.get()); |
4809 #if defined(ENABLE_JAVA_BRIDGE) | 4809 #if defined(ENABLE_JAVA_BRIDGE) |
4810 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 4810 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
4811 #endif | 4811 #endif |
4812 } | 4812 } |
OLD | NEW |