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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 #include "third_party/WebKit/public/web/WebInputEvent.h" | 173 #include "third_party/WebKit/public/web/WebInputEvent.h" |
174 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h" | 174 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h" |
175 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 175 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
176 #include "third_party/WebKit/public/web/WebNodeList.h" | 176 #include "third_party/WebKit/public/web/WebNodeList.h" |
177 #include "third_party/WebKit/public/web/WebPageSerializer.h" | 177 #include "third_party/WebKit/public/web/WebPageSerializer.h" |
178 #include "third_party/WebKit/public/web/WebPlugin.h" | 178 #include "third_party/WebKit/public/web/WebPlugin.h" |
179 #include "third_party/WebKit/public/web/WebPluginAction.h" | 179 #include "third_party/WebKit/public/web/WebPluginAction.h" |
180 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 180 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
181 #include "third_party/WebKit/public/web/WebPluginDocument.h" | 181 #include "third_party/WebKit/public/web/WebPluginDocument.h" |
182 #include "third_party/WebKit/public/web/WebRange.h" | 182 #include "third_party/WebKit/public/web/WebRange.h" |
183 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | |
184 #include "third_party/WebKit/public/web/WebScriptSource.h" | 183 #include "third_party/WebKit/public/web/WebScriptSource.h" |
185 #include "third_party/WebKit/public/web/WebSearchableFormData.h" | 184 #include "third_party/WebKit/public/web/WebSearchableFormData.h" |
186 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 185 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
187 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" | 186 #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
188 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 187 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
189 #include "third_party/WebKit/public/web/WebSettings.h" | 188 #include "third_party/WebKit/public/web/WebSettings.h" |
190 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 189 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
191 #include "third_party/WebKit/public/web/WebUserMediaClient.h" | 190 #include "third_party/WebKit/public/web/WebUserMediaClient.h" |
192 #include "third_party/WebKit/public/web/WebView.h" | 191 #include "third_party/WebKit/public/web/WebView.h" |
193 #include "third_party/WebKit/public/web/WebWindowFeatures.h" | 192 #include "third_party/WebKit/public/web/WebWindowFeatures.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 using blink::WebPeerConnectionHandler; | 285 using blink::WebPeerConnectionHandler; |
287 using blink::WebPeerConnectionHandlerClient; | 286 using blink::WebPeerConnectionHandlerClient; |
288 using blink::WebPluginAction; | 287 using blink::WebPluginAction; |
289 using blink::WebPluginContainer; | 288 using blink::WebPluginContainer; |
290 using blink::WebPluginDocument; | 289 using blink::WebPluginDocument; |
291 using blink::WebPoint; | 290 using blink::WebPoint; |
292 using blink::WebPopupMenuInfo; | 291 using blink::WebPopupMenuInfo; |
293 using blink::WebRange; | 292 using blink::WebRange; |
294 using blink::WebRect; | 293 using blink::WebRect; |
295 using blink::WebReferrerPolicy; | 294 using blink::WebReferrerPolicy; |
296 using blink::WebRuntimeFeatures; | |
297 using blink::WebScriptSource; | 295 using blink::WebScriptSource; |
298 using blink::WebSearchableFormData; | 296 using blink::WebSearchableFormData; |
299 using blink::WebSecurityOrigin; | 297 using blink::WebSecurityOrigin; |
300 using blink::WebSecurityPolicy; | 298 using blink::WebSecurityPolicy; |
301 using blink::WebSerializedScriptValue; | 299 using blink::WebSerializedScriptValue; |
302 using blink::WebSettings; | 300 using blink::WebSettings; |
303 using blink::WebSize; | 301 using blink::WebSize; |
304 using blink::WebSocketStreamHandle; | 302 using blink::WebSocketStreamHandle; |
305 using blink::WebStorageNamespace; | 303 using blink::WebStorageNamespace; |
306 using blink::WebStorageQuotaCallbacks; | 304 using blink::WebStorageQuotaCallbacks; |
(...skipping 4015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4322 return; | 4320 return; |
4323 | 4321 |
4324 frame->document().insertUserStyleSheet( | 4322 frame->document().insertUserStyleSheet( |
4325 WebString::fromUTF8(css), | 4323 WebString::fromUTF8(css), |
4326 WebDocument::UserStyleAuthorLevel); | 4324 WebDocument::UserStyleAuthorLevel); |
4327 } | 4325 } |
4328 | 4326 |
4329 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { | 4327 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { |
4330 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && | 4328 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && |
4331 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { | 4329 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { |
4332 // WebUI uses <dialog> which is not yet enabled by default in Chrome. | |
4333 WebRuntimeFeatures::enableDialogElement(true); | |
4334 | |
4335 RenderThread::Get()->RegisterExtension(WebUIExtension::Get()); | 4330 RenderThread::Get()->RegisterExtension(WebUIExtension::Get()); |
4336 new WebUIExtensionData(this); | 4331 new WebUIExtensionData(this); |
4337 } | 4332 } |
4338 | 4333 |
4339 enabled_bindings_ |= enabled_bindings_flags; | 4334 enabled_bindings_ |= enabled_bindings_flags; |
4340 | 4335 |
4341 // Keep track of the total bindings accumulated in this process. | 4336 // Keep track of the total bindings accumulated in this process. |
4342 RenderProcess::current()->AddBindings(enabled_bindings_flags); | 4337 RenderProcess::current()->AddBindings(enabled_bindings_flags); |
4343 } | 4338 } |
4344 | 4339 |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5775 for (size_t i = 0; i < icon_urls.size(); i++) { | 5770 for (size_t i = 0; i < icon_urls.size(); i++) { |
5776 WebURL url = icon_urls[i].iconURL(); | 5771 WebURL url = icon_urls[i].iconURL(); |
5777 if (!url.isEmpty()) | 5772 if (!url.isEmpty()) |
5778 urls.push_back(FaviconURL(url, | 5773 urls.push_back(FaviconURL(url, |
5779 ToFaviconType(icon_urls[i].iconType()))); | 5774 ToFaviconType(icon_urls[i].iconType()))); |
5780 } | 5775 } |
5781 SendUpdateFaviconURL(urls); | 5776 SendUpdateFaviconURL(urls); |
5782 } | 5777 } |
5783 | 5778 |
5784 } // namespace content | 5779 } // namespace content |
OLD | NEW |