| 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 2683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2694 } | 2694 } |
| 2695 | 2695 |
| 2696 gfx::Size old_visible_viewport_size = visible_viewport_size_; | 2696 gfx::Size old_visible_viewport_size = visible_viewport_size_; |
| 2697 | 2697 |
| 2698 RenderWidget::OnResize(params); | 2698 RenderWidget::OnResize(params); |
| 2699 | 2699 |
| 2700 if (old_visible_viewport_size != visible_viewport_size_) | 2700 if (old_visible_viewport_size != visible_viewport_size_) |
| 2701 has_scrolled_focused_editable_node_into_rect_ = false; | 2701 has_scrolled_focused_editable_node_into_rect_ = false; |
| 2702 } | 2702 } |
| 2703 | 2703 |
| 2704 void RenderViewImpl::DidInitiatePaint() { | 2704 void RenderViewImpl::RenderWidgetDidCommitAndDrawCompositorFrame() { |
| 2705 #if defined(ENABLE_PLUGINS) | 2705 #if defined(ENABLE_PLUGINS) |
| 2706 // Notify all instances that we painted. The same caveats apply as for | 2706 // Notify all instances that we painted. The same caveats apply as for |
| 2707 // ViewFlushedPaint regarding instances closing themselves, so we take | 2707 // ViewFlushedPaint regarding instances closing themselves, so we take |
| 2708 // similar precautions. | 2708 // similar precautions. |
| 2709 PepperPluginSet plugins = active_pepper_instances_; | 2709 PepperPluginSet plugins = active_pepper_instances_; |
| 2710 for (PepperPluginSet::iterator i = plugins.begin(); i != plugins.end(); ++i) { | 2710 for (PepperPluginSet::iterator i = plugins.begin(); i != plugins.end(); ++i) { |
| 2711 if (active_pepper_instances_.find(*i) != active_pepper_instances_.end()) | 2711 if (active_pepper_instances_.find(*i) != active_pepper_instances_.end()) |
| 2712 (*i)->ViewInitiatedPaint(); | 2712 (*i)->ViewInitiatedPaint(); |
| 2713 } | 2713 } |
| 2714 #endif | 2714 #endif |
| 2715 } | 2715 } |
| 2716 | 2716 |
| 2717 void RenderViewImpl::DidFlushPaint() { | 2717 void RenderViewImpl::RenderWidgetDidFlushPaint() { |
| 2718 // If the RenderWidget is closing down then early-exit, otherwise we'll crash. | 2718 // If the RenderWidget is closing down then early-exit, otherwise we'll crash. |
| 2719 // See crbug.com/112921. | 2719 // See crbug.com/112921. |
| 2720 if (!webview()) | 2720 if (!webview()) |
| 2721 return; | 2721 return; |
| 2722 | 2722 |
| 2723 WebFrame* main_frame = webview()->mainFrame(); | 2723 WebFrame* main_frame = webview()->mainFrame(); |
| 2724 for (WebFrame* frame = main_frame; frame; | 2724 for (WebFrame* frame = main_frame; frame; |
| 2725 frame = frame->traverseNext(false)) { | 2725 frame = frame->traverseNext(false)) { |
| 2726 // TODO(nasko): This is a hack for the case in which the top-level | 2726 // TODO(nasko): This is a hack for the case in which the top-level |
| 2727 // frame is being rendered in another process. It will not | 2727 // frame is being rendered in another process. It will not |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3545 if (IsUseZoomForDSFEnabled()) { | 3545 if (IsUseZoomForDSFEnabled()) { |
| 3546 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3546 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3547 } else { | 3547 } else { |
| 3548 webview()->setDeviceScaleFactor(device_scale_factor_); | 3548 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3549 } | 3549 } |
| 3550 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3550 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3551 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3551 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3552 } | 3552 } |
| 3553 | 3553 |
| 3554 } // namespace content | 3554 } // namespace content |
| OLD | NEW |