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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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/renderer/render_widget_view_mus.h" | |
215 #endif // defined(MOJO_SHELL_CLIENT) | |
216 | |
213 using blink::WebAXObject; | 217 using blink::WebAXObject; |
214 using blink::WebApplicationCacheHost; | 218 using blink::WebApplicationCacheHost; |
215 using blink::WebApplicationCacheHostClient; | 219 using blink::WebApplicationCacheHostClient; |
216 using blink::WebCString; | 220 using blink::WebCString; |
217 using blink::WebColor; | 221 using blink::WebColor; |
218 using blink::WebConsoleMessage; | 222 using blink::WebConsoleMessage; |
219 using blink::WebData; | 223 using blink::WebData; |
220 using blink::WebDataSource; | 224 using blink::WebDataSource; |
221 using blink::WebDocument; | 225 using blink::WebDocument; |
222 using blink::WebDragData; | 226 using blink::WebDragData; |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
654 focused_pepper_plugin_(NULL), | 658 focused_pepper_plugin_(NULL), |
655 pepper_last_mouse_event_target_(NULL), | 659 pepper_last_mouse_event_target_(NULL), |
656 #endif | 660 #endif |
657 enumeration_completion_id_(0), | 661 enumeration_completion_id_(0), |
658 session_storage_namespace_id_(params.session_storage_namespace_id) { | 662 session_storage_namespace_id_(params.session_storage_namespace_id) { |
659 } | 663 } |
660 | 664 |
661 void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, | 665 void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, |
662 bool was_created_by_renderer) { | 666 bool was_created_by_renderer) { |
663 routing_id_ = params.view_id; | 667 routing_id_ = params.view_id; |
668 #if defined(MOJO_SHELL_CLIENT) | |
669 if (MojoShellConnection::Get() && routing_id_) { | |
670 new RenderWidgetViewMus(routing_id_); | |
Fady Samuel
2015/11/24 04:42:38
Add a command line check here.
| |
671 } | |
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 Loading... | |
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 |
OLD | NEW |