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 |
241 using blink::WebAXObject; | 245 using blink::WebAXObject; |
242 using blink::WebApplicationCacheHost; | 246 using blink::WebApplicationCacheHost; |
243 using blink::WebApplicationCacheHostClient; | 247 using blink::WebApplicationCacheHostClient; |
244 using blink::WebCString; | 248 using blink::WebCString; |
245 using blink::WebColor; | 249 using blink::WebColor; |
246 using blink::WebColorName; | 250 using blink::WebColorName; |
247 using blink::WebConsoleMessage; | 251 using blink::WebConsoleMessage; |
248 using blink::WebData; | 252 using blink::WebData; |
249 using blink::WebDataSource; | 253 using blink::WebDataSource; |
250 using blink::WebDocument; | 254 using blink::WebDocument; |
(...skipping 3423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3674 if (!params.target_origin.empty()) { | 3678 if (!params.target_origin.empty()) { |
3675 target_origin = | 3679 target_origin = |
3676 WebSecurityOrigin::createFromString(WebString(params.target_origin)); | 3680 WebSecurityOrigin::createFromString(WebString(params.target_origin)); |
3677 } | 3681 } |
3678 frame->dispatchMessageEventWithOriginCheck(target_origin, msg_event); | 3682 frame->dispatchMessageEventWithOriginCheck(target_origin, msg_event); |
3679 } | 3683 } |
3680 | 3684 |
3681 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { | 3685 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { |
3682 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && | 3686 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && |
3683 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { | 3687 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { |
| 3688 // WebUIExtensionData deletes itself when we're destroyed. |
3684 new WebUIExtensionData(this); | 3689 new WebUIExtensionData(this); |
| 3690 #if defined(USE_MOJO) |
| 3691 // WebUIMojo deletes itself when we're destroyed. |
| 3692 new WebUIMojo(this); |
| 3693 #endif |
3685 } | 3694 } |
3686 | 3695 |
3687 enabled_bindings_ |= enabled_bindings_flags; | 3696 enabled_bindings_ |= enabled_bindings_flags; |
3688 | 3697 |
3689 // Keep track of the total bindings accumulated in this process. | 3698 // Keep track of the total bindings accumulated in this process. |
3690 RenderProcess::current()->AddBindings(enabled_bindings_flags); | 3699 RenderProcess::current()->AddBindings(enabled_bindings_flags); |
3691 } | 3700 } |
3692 | 3701 |
3693 void RenderViewImpl::OnDragTargetDragEnter(const DropData& drop_data, | 3702 void RenderViewImpl::OnDragTargetDragEnter(const DropData& drop_data, |
3694 const gfx::Point& client_point, | 3703 const gfx::Point& client_point, |
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5116 for (size_t i = 0; i < icon_urls.size(); i++) { | 5125 for (size_t i = 0; i < icon_urls.size(); i++) { |
5117 WebURL url = icon_urls[i].iconURL(); | 5126 WebURL url = icon_urls[i].iconURL(); |
5118 if (!url.isEmpty()) | 5127 if (!url.isEmpty()) |
5119 urls.push_back(FaviconURL(url, | 5128 urls.push_back(FaviconURL(url, |
5120 ToFaviconType(icon_urls[i].iconType()))); | 5129 ToFaviconType(icon_urls[i].iconType()))); |
5121 } | 5130 } |
5122 SendUpdateFaviconURL(urls); | 5131 SendUpdateFaviconURL(urls); |
5123 } | 5132 } |
5124 | 5133 |
5125 } // namespace content | 5134 } // namespace content |
OLD | NEW |