Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 206923002: Adds plumbing to pass WebUI mojo::Handle from browser to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 trunk Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698