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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 1566303004: Smooth scroll on Windows should respect OS level animation disabling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 4 years, 11 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 | « no previous file | content/renderer/input/input_handler_manager.h » ('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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "content/public/common/url_constants.h" 74 #include "content/public/common/url_constants.h"
75 #include "content/public/common/url_utils.h" 75 #include "content/public/common/url_utils.h"
76 #include "net/base/filename_util.h" 76 #include "net/base/filename_util.h"
77 #include "net/base/net_util.h" 77 #include "net/base/net_util.h"
78 #include "net/url_request/url_request_context_getter.h" 78 #include "net/url_request/url_request_context_getter.h"
79 #include "storage/browser/fileapi/isolated_context.h" 79 #include "storage/browser/fileapi/isolated_context.h"
80 #include "third_party/skia/include/core/SkBitmap.h" 80 #include "third_party/skia/include/core/SkBitmap.h"
81 #include "ui/base/touch/touch_device.h" 81 #include "ui/base/touch/touch_device.h"
82 #include "ui/base/touch/touch_enabled.h" 82 #include "ui/base/touch/touch_enabled.h"
83 #include "ui/base/ui_base_switches.h" 83 #include "ui/base/ui_base_switches.h"
84 #include "ui/gfx/animation/animation.h"
84 #include "ui/gfx/image/image_skia.h" 85 #include "ui/gfx/image/image_skia.h"
85 #include "ui/gfx/native_widget_types.h" 86 #include "ui/gfx/native_widget_types.h"
86 #include "ui/native_theme/native_theme_switches.h" 87 #include "ui/native_theme/native_theme_switches.h"
87 #include "url/url_constants.h" 88 #include "url/url_constants.h"
88 89
89 #if defined(OS_WIN) 90 #if defined(OS_WIN)
90 #include "base/win/win_util.h" 91 #include "base/win/win_util.h"
91 #include "ui/gfx/platform_font_win.h" 92 #include "ui/gfx/platform_font_win.h"
92 #include "ui/gfx/win/dpi.h" 93 #include "ui/gfx/win/dpi.h"
93 #endif 94 #endif
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 #endif 474 #endif
474 475
475 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); 476 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints();
476 477
477 prefs.touch_adjustment_enabled = 478 prefs.touch_adjustment_enabled =
478 !command_line.HasSwitch(switches::kDisableTouchAdjustment); 479 !command_line.HasSwitch(switches::kDisableTouchAdjustment);
479 480
480 prefs.slimming_paint_v2_enabled = 481 prefs.slimming_paint_v2_enabled =
481 command_line.HasSwitch(switches::kEnableSlimmingPaintV2); 482 command_line.HasSwitch(switches::kEnableSlimmingPaintV2);
482 483
483 prefs.enable_scroll_animator = !command_line.HasSwitch( 484 prefs.enable_scroll_animator =
484 switches::kDisableSmoothScrolling); 485 !command_line.HasSwitch(switches::kDisableSmoothScrolling) &&
486 gfx::Animation::ShouldRenderRichAnimation();
485 487
486 // Certain GPU features might have been blacklisted. 488 // Certain GPU features might have been blacklisted.
487 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); 489 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs);
488 490
489 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( 491 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings(
490 GetProcess()->GetID())) { 492 GetProcess()->GetID())) {
491 prefs.loads_images_automatically = true; 493 prefs.loads_images_automatically = true;
492 prefs.javascript_enabled = true; 494 prefs.javascript_enabled = true;
493 } 495 }
494 496
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 } else { 1390 } else {
1389 render_view_ready_on_process_launch_ = true; 1391 render_view_ready_on_process_launch_ = true;
1390 } 1392 }
1391 } 1393 }
1392 1394
1393 void RenderViewHostImpl::RenderViewReady() { 1395 void RenderViewHostImpl::RenderViewReady() {
1394 delegate_->RenderViewReady(this); 1396 delegate_->RenderViewReady(this);
1395 } 1397 }
1396 1398
1397 } // namespace content 1399 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/input/input_handler_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698