| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 5918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5929 for (plugin_it = plugin_delegates_.begin(); | 5929 for (plugin_it = plugin_delegates_.begin(); |
| 5930 plugin_it != plugin_delegates_.end(); ++plugin_it) { | 5930 plugin_it != plugin_delegates_.end(); ++plugin_it) { |
| 5931 (*plugin_it)->SetContainerVisibility(true); | 5931 (*plugin_it)->SetContainerVisibility(true); |
| 5932 } | 5932 } |
| 5933 #endif // OS_MACOSX | 5933 #endif // OS_MACOSX |
| 5934 } | 5934 } |
| 5935 | 5935 |
| 5936 bool RenderViewImpl::SupportsAsynchronousSwapBuffers() { | 5936 bool RenderViewImpl::SupportsAsynchronousSwapBuffers() { |
| 5937 // Contexts using the command buffer support asynchronous swapbuffers. | 5937 // Contexts using the command buffer support asynchronous swapbuffers. |
| 5938 // See RenderViewImpl::createOutputSurface(). | 5938 // See RenderViewImpl::createOutputSurface(). |
| 5939 if (RenderThreadImpl::current()->compositor_thread() || | 5939 if (WebWidgetHandlesCompositorScheduling() || |
| 5940 CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) | 5940 CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) |
| 5941 return false; | 5941 return false; |
| 5942 | 5942 |
| 5943 return true; | 5943 return true; |
| 5944 } | 5944 } |
| 5945 | 5945 |
| 5946 bool RenderViewImpl::ForceCompositingModeEnabled() { | 5946 bool RenderViewImpl::ForceCompositingModeEnabled() { |
| 5947 return webkit_preferences_.force_compositing_mode; | 5947 return webkit_preferences_.force_compositing_mode; |
| 5948 } | 5948 } |
| 5949 | 5949 |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6497 | 6497 |
| 6498 void RenderViewImpl::OnEnableViewSourceMode() { | 6498 void RenderViewImpl::OnEnableViewSourceMode() { |
| 6499 if (!webview()) | 6499 if (!webview()) |
| 6500 return; | 6500 return; |
| 6501 WebFrame* main_frame = webview()->mainFrame(); | 6501 WebFrame* main_frame = webview()->mainFrame(); |
| 6502 if (!main_frame) | 6502 if (!main_frame) |
| 6503 return; | 6503 return; |
| 6504 main_frame->enableViewSourceMode(true); | 6504 main_frame->enableViewSourceMode(true); |
| 6505 } | 6505 } |
| 6506 | 6506 |
| 6507 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
| 6508 return !!RenderThreadImpl::current()->compositor_thread(); |
| 6509 } |
| 6510 |
| 6507 void RenderViewImpl::OnJavaBridgeInit() { | 6511 void RenderViewImpl::OnJavaBridgeInit() { |
| 6508 DCHECK(!java_bridge_dispatcher_); | 6512 DCHECK(!java_bridge_dispatcher_); |
| 6509 #if defined(ENABLE_JAVA_BRIDGE) | 6513 #if defined(ENABLE_JAVA_BRIDGE) |
| 6510 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 6514 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
| 6511 #endif | 6515 #endif |
| 6512 } | 6516 } |
| 6513 | 6517 |
| 6514 void RenderViewImpl::OnDisownOpener() { | 6518 void RenderViewImpl::OnDisownOpener() { |
| 6515 if (!webview()) | 6519 if (!webview()) |
| 6516 return; | 6520 return; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6584 } | 6588 } |
| 6585 #endif | 6589 #endif |
| 6586 | 6590 |
| 6587 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6591 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6588 TransportDIB::Handle dib_handle) { | 6592 TransportDIB::Handle dib_handle) { |
| 6589 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6593 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6590 RenderProcess::current()->ReleaseTransportDIB(dib); | 6594 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6591 } | 6595 } |
| 6592 | 6596 |
| 6593 } // namespace content | 6597 } // namespace content |
| OLD | NEW |