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_connection.h" | |
216 #endif | |
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 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1704 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStopLoading()); | 1709 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidStopLoading()); |
1705 } | 1710 } |
1706 } | 1711 } |
1707 | 1712 |
1708 void RenderViewImpl::AttachWebFrameWidget(blink::WebWidget* frame_widget) { | 1713 void RenderViewImpl::AttachWebFrameWidget(blink::WebWidget* frame_widget) { |
1709 // The previous WebFrameWidget must already be detached by CloseForFrame(). | 1714 // The previous WebFrameWidget must already be detached by CloseForFrame(). |
1710 DCHECK(!frame_widget_); | 1715 DCHECK(!frame_widget_); |
1711 frame_widget_ = frame_widget; | 1716 frame_widget_ = frame_widget; |
1712 } | 1717 } |
1713 | 1718 |
1719 scoped_ptr<cc::OutputSurface> RenderViewImpl::CreateOutputSurface( | |
1720 bool fallback) { | |
1721 if (MojoShellConnection::Get()->GetApplication()) { | |
Fady Samuel
2015/11/30 23:06:54
I would also put this whole block around
#if defi
Peng
2015/12/01 15:22:46
Done.
| |
1722 RenderWidgetMusConnection* connection = | |
1723 RenderWidgetMusConnection::Get(routing_id()); | |
1724 return connection->CreateOutputSurface(); | |
1725 } | |
1726 return RenderWidget::CreateOutputSurface(fallback); | |
1727 } | |
1728 | |
1714 void RenderViewImpl::SetZoomLevel(double zoom_level) { | 1729 void RenderViewImpl::SetZoomLevel(double zoom_level) { |
1715 webview()->setZoomLevel(zoom_level); | 1730 webview()->setZoomLevel(zoom_level); |
1716 FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnZoomLevelChanged()); | 1731 FOR_EACH_OBSERVER(RenderViewObserver, observers_, OnZoomLevelChanged()); |
1717 } | 1732 } |
1718 | 1733 |
1719 void RenderViewImpl::didCancelCompositionOnSelectionChange() { | 1734 void RenderViewImpl::didCancelCompositionOnSelectionChange() { |
1720 Send(new InputHostMsg_ImeCancelComposition(routing_id())); | 1735 Send(new InputHostMsg_ImeCancelComposition(routing_id())); |
1721 } | 1736 } |
1722 | 1737 |
1723 bool RenderViewImpl::handleCurrentKeyboardEvent() { | 1738 bool RenderViewImpl::handleCurrentKeyboardEvent() { |
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3720 if (IsUseZoomForDSFEnabled()) { | 3735 if (IsUseZoomForDSFEnabled()) { |
3721 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_); | 3736 compositor_->SetPaintedDeviceScaleFactor(device_scale_factor_); |
3722 webview()->setZoomFactorForDeviceScaleFactor( | 3737 webview()->setZoomFactorForDeviceScaleFactor( |
3723 device_scale_factor_); | 3738 device_scale_factor_); |
3724 } else { | 3739 } else { |
3725 webview()->setDeviceScaleFactor(device_scale_factor_); | 3740 webview()->setDeviceScaleFactor(device_scale_factor_); |
3726 } | 3741 } |
3727 } | 3742 } |
3728 | 3743 |
3729 } // namespace content | 3744 } // namespace content |
OLD | NEW |