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

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: Previous patch accidentally lost new files 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 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 8ce48fe22a921cbe60f9c1b3fda9035888120d0f..9c02060acab8d9da055fbc58c40e1e3c2d67541c 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2645,20 +2645,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)
@@ -2802,4 +2789,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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698