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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 if (command_line.HasSwitch(switches::kDomAutomationController)) | 787 if (command_line.HasSwitch(switches::kDomAutomationController)) |
788 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; | 788 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; |
789 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 789 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
790 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; | 790 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; |
791 | 791 |
792 GetContentClient()->renderer()->RenderViewCreated(this); | 792 GetContentClient()->renderer()->RenderViewCreated(this); |
793 | 793 |
794 // Ensure that sandbox flags are inherited from an opener in a different | 794 // Ensure that sandbox flags are inherited from an opener in a different |
795 // process. In that case, the browser process will set any inherited sandbox | 795 // process. In that case, the browser process will set any inherited sandbox |
796 // flags in |replicated_frame_state|, so apply them here. | 796 // flags in |replicated_frame_state|, so apply them here. |
797 if (opener_frame && !was_created_by_renderer && | 797 if (!was_created_by_renderer && webview()->mainFrame()->isWebLocalFrame()) { |
798 webview()->mainFrame()->isWebLocalFrame()) { | |
799 webview()->mainFrame()->toWebLocalFrame()->forceSandboxFlags( | 798 webview()->mainFrame()->toWebLocalFrame()->forceSandboxFlags( |
800 params.replicated_frame_state.sandbox_flags); | 799 params.replicated_frame_state.sandbox_flags); |
801 } | 800 } |
802 } | 801 } |
803 | 802 |
804 RenderViewImpl::~RenderViewImpl() { | 803 RenderViewImpl::~RenderViewImpl() { |
805 DCHECK(!frame_widget_); | 804 DCHECK(!frame_widget_); |
806 | 805 |
807 for (BitmapMap::iterator it = disambiguation_bitmaps_.begin(); | 806 for (BitmapMap::iterator it = disambiguation_bitmaps_.begin(); |
808 it != disambiguation_bitmaps_.end(); | 807 it != disambiguation_bitmaps_.end(); |
(...skipping 2490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3299 if (IsUseZoomForDSFEnabled()) { | 3298 if (IsUseZoomForDSFEnabled()) { |
3300 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3299 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3301 } else { | 3300 } else { |
3302 webview()->setDeviceScaleFactor(device_scale_factor_); | 3301 webview()->setDeviceScaleFactor(device_scale_factor_); |
3303 } | 3302 } |
3304 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3303 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3305 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3304 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3306 } | 3305 } |
3307 | 3306 |
3308 } // namespace content | 3307 } // namespace content |
OLD | NEW |