| 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 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 GetContentClient()->renderer()->RenderViewCreated(this); | 800 GetContentClient()->renderer()->RenderViewCreated(this); |
| 801 | 801 |
| 802 // Ensure that sandbox flags are inherited from an opener in a different | 802 // Ensure that sandbox flags are inherited from an opener in a different |
| 803 // process. In that case, the browser process will set any inherited sandbox | 803 // process. In that case, the browser process will set any inherited sandbox |
| 804 // flags in |replicated_frame_state|, so apply them here. | 804 // flags in |replicated_frame_state|, so apply them here. |
| 805 if (opener_frame && !was_created_by_renderer && | 805 if (opener_frame && !was_created_by_renderer && |
| 806 webview()->mainFrame()->isWebLocalFrame()) { | 806 webview()->mainFrame()->isWebLocalFrame()) { |
| 807 webview()->mainFrame()->toWebLocalFrame()->forceSandboxFlags( | 807 webview()->mainFrame()->toWebLocalFrame()->forceSandboxFlags( |
| 808 params.replicated_frame_state.sandbox_flags); | 808 params.replicated_frame_state.sandbox_flags); |
| 809 } | 809 } |
| 810 | |
| 811 // If we are initially swapped out, navigate to kSwappedOutURL. | |
| 812 // This ensures we are in a unique origin that others cannot script. | |
| 813 if (is_swapped_out_ && webview()->mainFrame()->isWebLocalFrame()) | |
| 814 main_render_frame_->NavigateToSwappedOutURL(); | |
| 815 } | 810 } |
| 816 | 811 |
| 817 RenderViewImpl::~RenderViewImpl() { | 812 RenderViewImpl::~RenderViewImpl() { |
| 818 DCHECK(!frame_widget_); | 813 DCHECK(!frame_widget_); |
| 819 | 814 |
| 820 for (BitmapMap::iterator it = disambiguation_bitmaps_.begin(); | 815 for (BitmapMap::iterator it = disambiguation_bitmaps_.begin(); |
| 821 it != disambiguation_bitmaps_.end(); | 816 it != disambiguation_bitmaps_.end(); |
| 822 ++it) | 817 ++it) |
| 823 delete it->second; | 818 delete it->second; |
| 824 | 819 |
| (...skipping 2702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3527 if (IsUseZoomForDSFEnabled()) { | 3522 if (IsUseZoomForDSFEnabled()) { |
| 3528 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3523 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
| 3529 } else { | 3524 } else { |
| 3530 webview()->setDeviceScaleFactor(device_scale_factor_); | 3525 webview()->setDeviceScaleFactor(device_scale_factor_); |
| 3531 } | 3526 } |
| 3532 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3527 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
| 3533 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3528 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
| 3534 } | 3529 } |
| 3535 | 3530 |
| 3536 } // namespace content | 3531 } // namespace content |
| OLD | NEW |