Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1470823002: Enable builtin Mojo JS modules in layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usb-testing
Patch Set: oops, clumsy Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/shell/browser/shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | content/shell/browser/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698