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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1653003002: Make scrollAnimatorEnabled work on Mac like it does on other platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 67f45e6b5283db6f5e52aa1a2b163a2997742412..f2db014454366207de4be6ce9e126604466dab0c 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2612,20 +2612,7 @@ void RenderProcessHostImpl::OnCloseACK(int old_route_id) {
}
void RenderProcessHostImpl::OnGpuSwitched() {
- // We are updating all widgets including swapped out ones.
- scoped_ptr<RenderWidgetHostIterator> widgets(
- RenderWidgetHostImpl::GetAllRenderWidgetHosts());
- while (RenderWidgetHost* widget = widgets->GetNextHost()) {
- RenderViewHost* rvh = RenderViewHost::From(widget);
- if (!rvh)
- continue;
-
- // Skip widgets in other processes.
- if (rvh->GetProcess()->GetID() != GetID())
- continue;
-
- rvh->OnWebkitPreferencesChanged();
- }
+ RecomputeAndUpdateWebKitPreferences();
}
#if defined(ENABLE_WEBRTC)
@@ -2769,4 +2756,21 @@ BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
return bluetooth_dispatcher_host_.get();
}
+void RenderProcessHostImpl::RecomputeAndUpdateWebKitPreferences() {
+ // We are updating all widgets including swapped out ones.
+ scoped_ptr<RenderWidgetHostIterator> widgets(
+ RenderWidgetHostImpl::GetAllRenderWidgetHosts());
+ while (RenderWidgetHost* widget = widgets->GetNextHost()) {
+ RenderViewHost* rvh = RenderViewHost::From(widget);
+ if (!rvh)
+ continue;
+
+ // Skip widgets in other processes.
+ if (rvh->GetProcess()->GetID() != GetID())
+ continue;
+
+ rvh->OnWebkitPreferencesChanged();
+ }
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698