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

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

Issue 2339873002: Replace hide-scrollbars flag with a web setting. (Closed)
Patch Set: check for presence of settings using DCHECK + sync. Created 4 years, 2 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
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 #include <memory> 9 #include <memory>
10 10
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 // and support is compiled in. 997 // and support is compiled in.
998 settings->setExperimentalWebGLEnabled(prefs.experimental_webgl_enabled); 998 settings->setExperimentalWebGLEnabled(prefs.experimental_webgl_enabled);
999 999
1000 // Enable WebGL errors to the JS console if requested. 1000 // Enable WebGL errors to the JS console if requested.
1001 settings->setWebGLErrorsToConsoleEnabled( 1001 settings->setWebGLErrorsToConsoleEnabled(
1002 prefs.webgl_errors_to_console_enabled); 1002 prefs.webgl_errors_to_console_enabled);
1003 1003
1004 // Uses the mock theme engine for scrollbars. 1004 // Uses the mock theme engine for scrollbars.
1005 settings->setMockScrollbarsEnabled(prefs.mock_scrollbars_enabled); 1005 settings->setMockScrollbarsEnabled(prefs.mock_scrollbars_enabled);
1006 1006
1007 settings->setHideScrollbars(prefs.hide_scrollbars);
1008
1007 // Enable gpu-accelerated 2d canvas if requested on the command line. 1009 // Enable gpu-accelerated 2d canvas if requested on the command line.
1008 WebRuntimeFeatures::enableAccelerated2dCanvas( 1010 WebRuntimeFeatures::enableAccelerated2dCanvas(
1009 prefs.accelerated_2d_canvas_enabled); 1011 prefs.accelerated_2d_canvas_enabled);
1010 1012
1011 settings->setMinimumAccelerated2dCanvasSize( 1013 settings->setMinimumAccelerated2dCanvasSize(
1012 prefs.minimum_accelerated_2d_canvas_size); 1014 prefs.minimum_accelerated_2d_canvas_size);
1013 1015
1014 // Disable antialiasing for 2d canvas if requested on the command line. 1016 // Disable antialiasing for 2d canvas if requested on the command line.
1015 settings->setAntialiased2dCanvasEnabled( 1017 settings->setAntialiased2dCanvasEnabled(
1016 !prefs.antialiased_2d_canvas_disabled); 1018 !prefs.antialiased_2d_canvas_disabled);
(...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after
3033 return render_frame->focused_pepper_plugin(); 3035 return render_frame->focused_pepper_plugin();
3034 } 3036 }
3035 frame = frame->traverseNext(false); 3037 frame = frame->traverseNext(false);
3036 } 3038 }
3037 3039
3038 return nullptr; 3040 return nullptr;
3039 } 3041 }
3040 #endif 3042 #endif
3041 3043
3042 } // namespace content 3044 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | third_party/WebKit/LayoutTests/fast/scrolling/hide-scrollbars.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698