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

Side by Side 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, 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2594 matching lines...) Expand 10 before | Expand all | Expand 10 after
2605 2605
2606 void RenderProcessHostImpl::OnCloseACK(int old_route_id) { 2606 void RenderProcessHostImpl::OnCloseACK(int old_route_id) {
2607 SessionStorageHolder* holder = 2607 SessionStorageHolder* holder =
2608 static_cast<SessionStorageHolder*>(GetUserData(kSessionStorageHolderKey)); 2608 static_cast<SessionStorageHolder*>(GetUserData(kSessionStorageHolderKey));
2609 if (!holder) 2609 if (!holder)
2610 return; 2610 return;
2611 holder->Release(old_route_id); 2611 holder->Release(old_route_id);
2612 } 2612 }
2613 2613
2614 void RenderProcessHostImpl::OnGpuSwitched() { 2614 void RenderProcessHostImpl::OnGpuSwitched() {
2615 // We are updating all widgets including swapped out ones. 2615 RecomputeAndUpdateWebKitPreferences();
2616 scoped_ptr<RenderWidgetHostIterator> widgets(
2617 RenderWidgetHostImpl::GetAllRenderWidgetHosts());
2618 while (RenderWidgetHost* widget = widgets->GetNextHost()) {
2619 RenderViewHost* rvh = RenderViewHost::From(widget);
2620 if (!rvh)
2621 continue;
2622
2623 // Skip widgets in other processes.
2624 if (rvh->GetProcess()->GetID() != GetID())
2625 continue;
2626
2627 rvh->OnWebkitPreferencesChanged();
2628 }
2629 } 2616 }
2630 2617
2631 #if defined(ENABLE_WEBRTC) 2618 #if defined(ENABLE_WEBRTC)
2632 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) { 2619 void RenderProcessHostImpl::OnRegisterAecDumpConsumer(int id) {
2633 BrowserThread::PostTask( 2620 BrowserThread::PostTask(
2634 BrowserThread::UI, FROM_HERE, 2621 BrowserThread::UI, FROM_HERE,
2635 base::Bind(&RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread, 2622 base::Bind(&RenderProcessHostImpl::RegisterAecDumpConsumerOnUIThread,
2636 weak_factory_.GetWeakPtr(), id)); 2623 weak_factory_.GetWeakPtr(), id));
2637 } 2624 }
2638 2625
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2762 2749
2763 void RenderProcessHostImpl::GetAudioOutputControllers( 2750 void RenderProcessHostImpl::GetAudioOutputControllers(
2764 const GetAudioOutputControllersCallback& callback) const { 2751 const GetAudioOutputControllersCallback& callback) const {
2765 audio_renderer_host()->GetOutputControllers(callback); 2752 audio_renderer_host()->GetOutputControllers(callback);
2766 } 2753 }
2767 2754
2768 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() { 2755 BluetoothDispatcherHost* RenderProcessHostImpl::GetBluetoothDispatcherHost() {
2769 return bluetooth_dispatcher_host_.get(); 2756 return bluetooth_dispatcher_host_.get();
2770 } 2757 }
2771 2758
2759 void RenderProcessHostImpl::RecomputeAndUpdateWebKitPreferences() {
2760 // We are updating all widgets including swapped out ones.
2761 scoped_ptr<RenderWidgetHostIterator> widgets(
2762 RenderWidgetHostImpl::GetAllRenderWidgetHosts());
2763 while (RenderWidgetHost* widget = widgets->GetNextHost()) {
2764 RenderViewHost* rvh = RenderViewHost::From(widget);
2765 if (!rvh)
2766 continue;
2767
2768 // Skip widgets in other processes.
2769 if (rvh->GetProcess()->GetID() != GetID())
2770 continue;
2771
2772 rvh->OnWebkitPreferencesChanged();
2773 }
2774 }
2775
2772 } // namespace content 2776 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698