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/public/common/mojo_shell_connection.h" |
| 215 #include "content/renderer/render_widget_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 Loading... |
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 (routing_id_ && MojoShellConnection::Get() && |
| 671 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 672 switches::kUseMusInRenderer)) { |
| 673 new RenderWidgetMus(routing_id_); |
| 674 } |
| 675 #endif |
664 | 676 |
665 int opener_view_routing_id; | 677 int opener_view_routing_id; |
666 WebFrame* opener_frame = RenderFrameImpl::ResolveOpener( | 678 WebFrame* opener_frame = RenderFrameImpl::ResolveOpener( |
667 params.opener_frame_route_id, &opener_view_routing_id); | 679 params.opener_frame_route_id, &opener_view_routing_id); |
668 if (opener_view_routing_id != MSG_ROUTING_NONE && was_created_by_renderer) | 680 if (opener_view_routing_id != MSG_ROUTING_NONE && was_created_by_renderer) |
669 opener_id_ = opener_view_routing_id; | 681 opener_id_ = opener_view_routing_id; |
670 | 682 |
671 display_mode_ = params.initial_size.display_mode; | 683 display_mode_ = params.initial_size.display_mode; |
672 | 684 |
673 // Ensure we start with a valid next_page_id_ from the browser. | 685 // 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()) { | 3721 if (IsUseZoomForDSFEnabled()) { |
3710 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_); | 3722 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_); |
3711 webview()->setZoomFactorForDeviceScaleFactor( | 3723 webview()->setZoomFactorForDeviceScaleFactor( |
3712 device_scale_factor_); | 3724 device_scale_factor_); |
3713 } else { | 3725 } else { |
3714 webview()->setDeviceScaleFactor(device_scale_factor_); | 3726 webview()->setDeviceScaleFactor(device_scale_factor_); |
3715 } | 3727 } |
3716 } | 3728 } |
3717 | 3729 |
3718 } // namespace content | 3730 } // namespace content |
OLD | NEW |