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 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 if (command_line.HasSwitch(switches::kDomAutomationController)) | 790 if (command_line.HasSwitch(switches::kDomAutomationController)) |
791 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; | 791 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; |
792 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 792 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
793 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; | 793 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; |
794 | 794 |
795 GetContentClient()->renderer()->RenderViewCreated(this); | 795 GetContentClient()->renderer()->RenderViewCreated(this); |
796 | 796 |
797 // Ensure that sandbox flags are inherited from an opener in a different | 797 // Ensure that sandbox flags are inherited from an opener in a different |
798 // process. In that case, the browser process will set any inherited sandbox | 798 // process. In that case, the browser process will set any inherited sandbox |
799 // flags in |replicated_frame_state|, so apply them here. | 799 // flags in |replicated_frame_state|, so apply them here. |
800 if (opener_frame && !was_created_by_renderer && | 800 if (!was_created_by_renderer && webview()->mainFrame()->isWebLocalFrame()) { |
801 webview()->mainFrame()->isWebLocalFrame()) { | |
802 webview()->mainFrame()->toWebLocalFrame()->forceSandboxFlags( | 801 webview()->mainFrame()->toWebLocalFrame()->forceSandboxFlags( |
803 params.replicated_frame_state.sandbox_flags); | 802 params.replicated_frame_state.sandbox_flags); |
804 } | 803 } |
805 } | 804 } |
806 | 805 |
807 RenderViewImpl::~RenderViewImpl() { | 806 RenderViewImpl::~RenderViewImpl() { |
808 DCHECK(!frame_widget_); | 807 DCHECK(!frame_widget_); |
809 | 808 |
810 for (BitmapMap::iterator it = disambiguation_bitmaps_.begin(); | 809 for (BitmapMap::iterator it = disambiguation_bitmaps_.begin(); |
811 it != disambiguation_bitmaps_.end(); | 810 it != disambiguation_bitmaps_.end(); |
(...skipping 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3441 if (IsUseZoomForDSFEnabled()) { | 3440 if (IsUseZoomForDSFEnabled()) { |
3442 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3441 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3443 } else { | 3442 } else { |
3444 webview()->setDeviceScaleFactor(device_scale_factor_); | 3443 webview()->setDeviceScaleFactor(device_scale_factor_); |
3445 } | 3444 } |
3446 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3445 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3447 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3446 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3448 } | 3447 } |
3449 | 3448 |
3450 } // namespace content | 3449 } // namespace content |
OLD | NEW |