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

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

Issue 1461243002: [OLD ATTEMPT, DO NOT REVIEW] mustash: Enable connections to mus from the Chrome renderer Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Ben's comments Created 5 years 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
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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 #include "content/renderer/npapi/webplugin_delegate_proxy.h" 203 #include "content/renderer/npapi/webplugin_delegate_proxy.h"
204 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 204 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
205 #include "content/renderer/pepper/pepper_plugin_registry.h" 205 #include "content/renderer/pepper/pepper_plugin_registry.h"
206 #endif 206 #endif
207 207
208 #if defined(ENABLE_WEBRTC) 208 #if defined(ENABLE_WEBRTC)
209 #include "content/renderer/media/rtc_peer_connection_handler.h" 209 #include "content/renderer/media/rtc_peer_connection_handler.h"
210 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" 210 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
211 #endif 211 #endif
212 212
213 #if defined(MOJO_SHELL_CLIENT)
214 #include "content/public/common/mojo_shell_connection.h"
215 #include "content/renderer/render_widget_view_mus.h"
216 #endif // defined(MOJO_SHELL_CLIENT)
217
213 using blink::WebAXObject; 218 using blink::WebAXObject;
214 using blink::WebApplicationCacheHost; 219 using blink::WebApplicationCacheHost;
215 using blink::WebApplicationCacheHostClient; 220 using blink::WebApplicationCacheHostClient;
216 using blink::WebCString; 221 using blink::WebCString;
217 using blink::WebColor; 222 using blink::WebColor;
218 using blink::WebConsoleMessage; 223 using blink::WebConsoleMessage;
219 using blink::WebData; 224 using blink::WebData;
220 using blink::WebDataSource; 225 using blink::WebDataSource;
221 using blink::WebDocument; 226 using blink::WebDocument;
222 using blink::WebDragData; 227 using blink::WebDragData;
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 focused_pepper_plugin_(NULL), 659 focused_pepper_plugin_(NULL),
655 pepper_last_mouse_event_target_(NULL), 660 pepper_last_mouse_event_target_(NULL),
656 #endif 661 #endif
657 enumeration_completion_id_(0), 662 enumeration_completion_id_(0),
658 session_storage_namespace_id_(params.session_storage_namespace_id) { 663 session_storage_namespace_id_(params.session_storage_namespace_id) {
659 } 664 }
660 665
661 void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, 666 void RenderViewImpl::Initialize(const ViewMsg_New_Params& params,
662 bool was_created_by_renderer) { 667 bool was_created_by_renderer) {
663 routing_id_ = params.view_id; 668 routing_id_ = params.view_id;
669 #if defined(MOJO_SHELL_CLIENT)
670 if (MojoShellConnection::Get() && routing_id_)
671 new RenderWidgetViewMus(routing_id_);
672 #endif
664 673
665 int opener_view_routing_id; 674 int opener_view_routing_id;
666 WebFrame* opener_frame = RenderFrameImpl::ResolveOpener( 675 WebFrame* opener_frame = RenderFrameImpl::ResolveOpener(
667 params.opener_frame_route_id, &opener_view_routing_id); 676 params.opener_frame_route_id, &opener_view_routing_id);
668 if (opener_view_routing_id != MSG_ROUTING_NONE && was_created_by_renderer) 677 if (opener_view_routing_id != MSG_ROUTING_NONE && was_created_by_renderer)
669 opener_id_ = opener_view_routing_id; 678 opener_id_ = opener_view_routing_id;
670 679
671 display_mode_ = params.initial_size.display_mode; 680 display_mode_ = params.initial_size.display_mode;
672 681
673 // Ensure we start with a valid next_page_id_ from the browser. 682 // Ensure we start with a valid next_page_id_ from the browser.
(...skipping 3035 matching lines...) Expand 10 before | Expand all | Expand 10 after
3709 if (IsUseZoomForDSFEnabled()) { 3718 if (IsUseZoomForDSFEnabled()) {
3710 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_); 3719 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_);
3711 webview()->setZoomFactorForDeviceScaleFactor( 3720 webview()->setZoomFactorForDeviceScaleFactor(
3712 device_scale_factor_); 3721 device_scale_factor_);
3713 } else { 3722 } else {
3714 webview()->setDeviceScaleFactor(device_scale_factor_); 3723 webview()->setDeviceScaleFactor(device_scale_factor_);
3715 } 3724 }
3716 } 3725 }
3717 3726
3718 } // namespace content 3727 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698