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 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2354 webview()->setPageEncoding(no_encoding); | 2354 webview()->setPageEncoding(no_encoding); |
2355 } | 2355 } |
2356 | 2356 |
2357 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { | 2357 void RenderViewImpl::OnAllowBindings(int enabled_bindings_flags) { |
2358 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && | 2358 if ((enabled_bindings_flags & BINDINGS_POLICY_WEB_UI) && |
2359 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { | 2359 !(enabled_bindings_ & BINDINGS_POLICY_WEB_UI)) { |
2360 // WebUIExtensionData deletes itself when we're destroyed. | 2360 // WebUIExtensionData deletes itself when we're destroyed. |
2361 new WebUIExtensionData(this); | 2361 new WebUIExtensionData(this); |
2362 | 2362 |
2363 if (main_render_frame_) | 2363 if (main_render_frame_) |
2364 main_render_frame_->EnableMojoBindings(); | 2364 main_render_frame_->EnableMojoBindings(false /* for_layout_tests */); |
| 2365 } |
| 2366 |
| 2367 if ((enabled_bindings_flags & BINDINGS_POLICY_MOJO) && |
| 2368 !(enabled_bindings_ & BINDINGS_POLICY_MOJO) && |
| 2369 main_render_frame_) { |
| 2370 main_render_frame_->EnableMojoBindings(true /* for_layout_tests */); |
2365 } | 2371 } |
2366 | 2372 |
2367 enabled_bindings_ |= enabled_bindings_flags; | 2373 enabled_bindings_ |= enabled_bindings_flags; |
2368 | 2374 |
2369 // Keep track of the total bindings accumulated in this process. | 2375 // Keep track of the total bindings accumulated in this process. |
2370 RenderProcess::current()->AddBindings(enabled_bindings_flags); | 2376 RenderProcess::current()->AddBindings(enabled_bindings_flags); |
2371 } | 2377 } |
2372 | 2378 |
2373 void RenderViewImpl::OnDragTargetDragEnter(const DropData& drop_data, | 2379 void RenderViewImpl::OnDragTargetDragEnter(const DropData& drop_data, |
2374 const gfx::Point& client_point, | 2380 const gfx::Point& client_point, |
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3489 if (IsUseZoomForDSFEnabled()) { | 3495 if (IsUseZoomForDSFEnabled()) { |
3490 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); | 3496 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); |
3491 } else { | 3497 } else { |
3492 webview()->setDeviceScaleFactor(device_scale_factor_); | 3498 webview()->setDeviceScaleFactor(device_scale_factor_); |
3493 } | 3499 } |
3494 webview()->settings()->setPreferCompositingToLCDTextEnabled( | 3500 webview()->settings()->setPreferCompositingToLCDTextEnabled( |
3495 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); | 3501 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); |
3496 } | 3502 } |
3497 | 3503 |
3498 } // namespace content | 3504 } // namespace content |
OLD | NEW |