| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 #if defined(ENABLE_PLUGINS) | 231 #if defined(ENABLE_PLUGINS) |
| 232 #include "content/renderer/npapi/webplugin_delegate_proxy.h" | 232 #include "content/renderer/npapi/webplugin_delegate_proxy.h" |
| 233 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 233 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 234 #include "content/renderer/pepper/pepper_plugin_registry.h" | 234 #include "content/renderer/pepper/pepper_plugin_registry.h" |
| 235 #endif | 235 #endif |
| 236 | 236 |
| 237 #if defined(ENABLE_WEBRTC) | 237 #if defined(ENABLE_WEBRTC) |
| 238 #include "content/renderer/media/rtc_peer_connection_handler.h" | 238 #include "content/renderer/media/rtc_peer_connection_handler.h" |
| 239 #endif | 239 #endif |
| 240 | 240 |
| 241 #if defined(USE_MOJO) | |
| 242 #include "content/renderer/web_ui_mojo.h" | |
| 243 #endif | |
| 244 | |
| 245 using blink::WebAXObject; | 241 using blink::WebAXObject; |
| 246 using blink::WebApplicationCacheHost; | 242 using blink::WebApplicationCacheHost; |
| 247 using blink::WebApplicationCacheHostClient; | 243 using blink::WebApplicationCacheHostClient; |
| 248 using blink::WebCString; | 244 using blink::WebCString; |
| 249 using blink::WebColor; | 245 using blink::WebColor; |
| 250 using blink::WebColorName; | 246 using blink::WebColorName; |
| 251 using blink::WebConsoleMessage; | 247 using blink::WebConsoleMessage; |
| 252 using blink::WebData; | 248 using blink::WebData; |
| 253 using blink::WebDataSource; | 249 using blink::WebDataSource; |
| 254 using blink::WebDocument; | 250 using blink::WebDocument; |
| (...skipping 3253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3508 if (!params.target_origin.empty()) { | 3504 if (!params.target_origin.empty()) { |
| 3509 target_origin = | 3505 target_origin = |
| 3510 WebSecurityOrigin::createFromString(WebString(params.target_origin)); | 3506 WebSecurityOrigin::createFromString(WebString(params.target_origin)); |
| 3511 } | 3507 } |
| 3512 frame->dispatchMessageEventWithOriginCheck(target_origin, msg_event); | 3508 frame->dispatchMessageEventWithOriginCheck(target_origin, msg_event); |
| 3513 } | 3509 } |
| 3514 | 3510 |
| 3515 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { | 3511 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { |
| 3516 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && | 3512 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && |
| 3517 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { | 3513 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { |
| 3518 // WebUIExtensionData deletes itself when we're destroyed. | |
| 3519 new WebUIExtensionData(this); | 3514 new WebUIExtensionData(this); |
| 3520 #if defined(USE_MOJO) | |
| 3521 // WebUIMojo deletes itself when we're destroyed. | |
| 3522 new WebUIMojo(this); | |
| 3523 #endif | |
| 3524 } | 3515 } |
| 3525 | 3516 |
| 3526 enabled_bindings_ |= enabled_bindings_flags; | 3517 enabled_bindings_ |= enabled_bindings_flags; |
| 3527 | 3518 |
| 3528 // Keep track of the total bindings accumulated in this process. | 3519 // Keep track of the total bindings accumulated in this process. |
| 3529 RenderProcess::current()->AddBindings(enabled_bindings_flags); | 3520 RenderProcess::current()->AddBindings(enabled_bindings_flags); |
| 3530 } | 3521 } |
| 3531 | 3522 |
| 3532 void RenderViewImpl::OnDragTargetDragEnter(const DropData& drop_data, | 3523 void RenderViewImpl::OnDragTargetDragEnter(const DropData& drop_data, |
| 3533 const gfx::Point& client_point, | 3524 const gfx::Point& client_point, |
| (...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4957 std::vector<gfx::Size> sizes(icon_urls[i].sizes().size()); | 4948 std::vector<gfx::Size> sizes(icon_urls[i].sizes().size()); |
| 4958 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4949 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4959 if (!url.isEmpty()) | 4950 if (!url.isEmpty()) |
| 4960 urls.push_back( | 4951 urls.push_back( |
| 4961 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4952 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4962 } | 4953 } |
| 4963 SendUpdateFaviconURL(urls); | 4954 SendUpdateFaviconURL(urls); |
| 4964 } | 4955 } |
| 4965 | 4956 |
| 4966 } // namespace content | 4957 } // namespace content |
| OLD | NEW |